https://github.com/spencermountain/amble
a watch script for cleaner development
https://github.com/spencermountain/amble
Last synced: 4 months ago
JSON representation
a watch script for cleaner development
- Host: GitHub
- URL: https://github.com/spencermountain/amble
- Owner: spencermountain
- Created: 2017-09-27T19:52:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-11T11:11:18.000Z (almost 4 years ago)
- Last Synced: 2024-12-15T02:26:40.415Z (4 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# amble
a clean way to 'hot-reload' a node.js script in the console.
`npm i amble`
then in your project
`amble ./toRun.js`
this will run file and watch all relevant files recursively.
i like to create a `./scratch.js` file, with my current stuff in it, so i run put this in my package.json:
```json
{
"scripts": {
"watch": "amble ./scratch.js"
}
}
```### javascript access
```js
var amble = require('amble')
amble({ exec: './scratch', watch: './' })
```if you want to pass arguments into node, put them after your filename:
```
amble scratch.mjs --experimental-modules
```huge thanks to Paul Miller's [chokidar library](https://github.com/paulmillr/chokidar)
MIT