+2
-2
@@ -8,3 +8,3 @@ #!/usr/bin/env node | ||
| .version(require('./package.json').version) | ||
| .option('-d, --dir [DIRECTORY]', 'Serve the contents of DIRECTORY (default=cwd/public)') | ||
| .option('-d, --dir [DIRECTORY]', 'Serve the contents of DIRECTORY (default=cwd)') | ||
| .option('-i, --index [INDEX]', 'Use the specified INDEX filename as the result when a directory is requested (default=index.html)') | ||
@@ -16,3 +16,3 @@ .option('-p, --port [PORT]', 'Listen on PORT (default=3000)', parseInt) | ||
| process.env.DEBUG = process.env.DEBUG || 'server,server:change' | ||
| process.env.DEBUG = process.env.DEBUG || 'drudge,drudge:change' | ||
@@ -19,0 +19,0 @@ if (program.quiet) process.env.DEBUG = false |
+9
-5
@@ -13,3 +13,3 @@ var path = require('path') | ||
| lrPort: 35729, | ||
| dir: path.resolve(process.cwd(), 'public') | ||
| dir: process.cwd() | ||
| } | ||
@@ -31,7 +31,11 @@ | ||
| var log = debug('server') | ||
| var logChange = debug('server:change') | ||
| var logReq = debug('server:req') | ||
| var log = debug('drudge') | ||
| var logChange = debug('drudge:change') | ||
| var logReq = debug('drudge:req') | ||
| var watcher = chokidar.watch(opts.dir, { ignoreInitial: true, persistent: true }) | ||
| var watcher = chokidar.watch(opts.dir, { | ||
| ignoreInitial: true, | ||
| ignored: /[\/\\]\./, | ||
| persistent: true | ||
| }) | ||
@@ -38,0 +42,0 @@ log('Watching %s', opts.dir) |
+1
-1
| { | ||
| "name": "drudge", | ||
| "version": "1.0.0", | ||
| "version": "2.0.0", | ||
| "description": "Drudge watches and serves your files while also acting as a LiveReload server", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+4
-2
@@ -15,2 +15,4 @@ # Drudge | ||
| As for the livereload client, you need to install the [browser extension](http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-) or add the livereload script tag [manually](http://feedback.livereload.com/knowledgebase/articles/86180-how-do-i-add-the-script-tag-manually-). | ||
| ## Installation | ||
@@ -35,3 +37,3 @@ | ||
| -V, --version output the version number | ||
| -d, --dir [DIRECTORY] Serve the contents of DIRECTORY (default=cwd/public) | ||
| -d, --dir [DIRECTORY] Serve the contents of DIRECTORY (default=cwd) | ||
| -i, --index [INDEX] Use the specified INDEX filename as the result when a directory is requested. (default=index.html) | ||
@@ -56,3 +58,3 @@ -p, --port [PORT] Listen on PORT (default=3000) | ||
| ``` | ||
| watchify index.js -o public/bundle.js & drudge | ||
| watchify index.js -o public/bundle.js & drudge -d public | ||
| ``` | ||
@@ -59,0 +61,0 @@ Now everytime you change a file in your project, watchify will update the bundle and drudge will subsequently trigger a reload in the browser. |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
6960
5.07%92
4.55%75
2.74%