Skip to content

Commit 7d6c1a8

Browse files
auriumremy
authored andcommitted
fix: Replace jade references by pug
close #1595
1 parent 74c8749 commit 7d6c1a8

File tree

12 files changed

+61
-61
lines changed

12 files changed

+61
-61
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ Don't use unix globbing to pass multiple directories, e.g `--watch ./lib/*`, it
178178
By default, nodemon looks for files with the `.js`, `.mjs`, `.coffee`, `.litcoffee`, and `.json` extensions. If you use the `--exec` option and monitor `app.py` nodemon will monitor files with the extension of `.py`. However, you can specify your own list with the `-e` (or `--ext`) switch like so:
179179

180180
```bash
181-
nodemon -e js,jade
181+
nodemon -e js,pug
182182
```
183183

184-
Now nodemon will restart on any changes to files in the directory (or subdirectories) with the extensions `.js`, `.jade`.
184+
Now nodemon will restart on any changes to files in the directory (or subdirectories) with the extensions `.js`, `.pug`.
185185

186186
## Ignoring files
187187

doc/cli/help.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Options:
44

55
--config file ............ alternate nodemon.json config file to use
6-
-e, --ext ................ extensions to look for, ie. js,jade,hbs.
6+
-e, --ext ................ extensions to look for, ie. js,pug,hbs.
77
-x, --exec app ........... execute script with "app", ie. -x "python -v".
88
-w, --watch path.......... watch directory "path" or files. use once for
99
each directory or file to watch.

doc/cli/options.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Configuration
1212
Execution
1313
-C, --on-change-only ..... execute script on change only, not startup
1414
--cwd <dir> .............. change into <dir> before running the script
15-
-e, --ext ................ extensions to look for, ie. "js,jade,hbs"
15+
-e, --ext ................ extensions to look for, ie. "js,pug,hbs"
1616
-I, --no-stdin ........... nodemon passes stdin directly to child process
1717
--spawn .................. force nodemon to use spawn (over fork) [node only]
1818
-x, --exec app ........... execute script with "app", ie. -x "python -v"

lib/config/exec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function exec(nodemonOptions, execMap) {
198198
}
199199

200200
// allow users to make a mistake on the extension to monitor
201-
// converts .js, jade => js,jade
201+
// converts .js, pug => js,pug
202202
// BIG NOTE: user can't do this: nodemon -e *.js
203203
// because the terminal will automatically expand the glob against
204204
// the file system :(

package-lock.json

+33-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cli/exec.test.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ describe('nodemon exec', function () {
8383
});
8484

8585
it('should support multiple extensions', function () {
86-
var options = exec({ script: 'app.js', ext: 'js, jade, hbs' });
86+
var options = exec({ script: 'app.js', ext: 'js, pug, hbs' });
8787
var cmd = toCmd(options);
8888
assert(cmd.string === 'node app.js', cmd.string);
89-
assert(options.ext.indexOf('jade') !== -1, 'comma separated string');
89+
assert(options.ext.indexOf('pug') !== -1, 'comma separated string');
9090

91-
options = exec({ script: 'app.js', ext: 'js|jade|hbs' });
91+
options = exec({ script: 'app.js', ext: 'js|pug|hbs' });
9292
assert(options.exec === 'node');
93-
assert(options.ext.indexOf('jade') !== -1, 'pipe separated string');
93+
assert(options.ext.indexOf('pug') !== -1, 'pipe separated string');
9494
});
9595

9696
it('should support watching all extensions', function () {
@@ -123,14 +123,14 @@ describe('nodemon exec', function () {
123123
});
124124

125125
it('should support extension maps', function () {
126-
var options = exec({ script: 'template.jade' }, { 'jade': 'jade {{filename}} --out /tmp' });
126+
var options = exec({ script: 'template.pug' }, { 'pug': 'pug {{filename}} --out /tmp' });
127127
var cmd = toCmd(options);
128-
assert(cmd.string === 'jade template.jade --out /tmp', cmd.string);
128+
assert(cmd.string === 'pug template.pug --out /tmp', cmd.string);
129129
});
130130

131131
it('should support input from argv#parse', function () {
132132
var parse = require('../../lib/cli/parse');
133-
parse('node /usr/local/bin/nodemon.js --debug -e js,jade,hbs app.js'.split(' '));
133+
parse('node /usr/local/bin/nodemon.js --debug -e js,pug,hbs app.js'.split(' '));
134134
});
135135

136136
it('should use coffeescript on .coffee', function () {
@@ -186,10 +186,10 @@ describe('nodemon exec', function () {
186186
});
187187

188188
it('should support single-level file extensions', function () {
189-
var options = exec({ ext: '.js, jade' });
189+
var options = exec({ ext: '.js, pug' });
190190

191191
assert(options.ext.indexOf('js') !== -1);
192-
assert(options.ext.indexOf('jade') !== -1);
192+
assert(options.ext.indexOf('pug') !== -1);
193193
});
194194

195195
it('should expand app to app.js', function () {

test/cli/parse.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe('nodemon argument parser', function () {
229229
});
230230

231231
it('should support short versions of flags', function () {
232-
var settings = cli.parse('node nodemon -v -x java -I -V -q -w fixtures -i fixtures -d 5 -L -C -e jade -s SIGHUP');
232+
var settings = cli.parse('node nodemon -v -x java -I -V -q -w fixtures -i fixtures -d 5 -L -C -e pug -s SIGHUP');
233233
assert(settings.version, 'version');
234234
assert(settings.verbose, 'verbose');
235235
assert(settings.exec === 'java', 'exec');
@@ -239,13 +239,13 @@ describe('nodemon argument parser', function () {
239239
assert(settings.ignore[0] === 'fixtures', 'ignore');
240240
assert(settings.delay === 5000, 'delay 5 seconds');
241241
assert(settings.runOnChangeOnly, 'run on change only');
242-
assert(settings.ext === 'jade', 'extension is jade');
242+
assert(settings.ext === 'pug', 'extension is pug');
243243
assert(settings.signal === 'SIGHUP', 'signal is SIGHUP');
244244
});
245245

246246

247247
it('should support long versions of flags', function () {
248-
var settings = cli.parse('node nodemon --version --exec java --verbose --quiet --watch fixtures --ignore fixtures --no-stdin --delay 5 --legacy-watch --exitcrash --on-change-only --ext jade --config my/.nodemon.json --signal SIGHUP');
248+
var settings = cli.parse('node nodemon --version --exec java --verbose --quiet --watch fixtures --ignore fixtures --no-stdin --delay 5 --legacy-watch --exitcrash --on-change-only --ext pug --config my/.nodemon.json --signal SIGHUP');
249249
assert(settings.version, 'version');
250250
assert(settings.verbose, 'verbose');
251251
assert(settings.exec === 'java', 'exec');
@@ -256,7 +256,7 @@ describe('nodemon argument parser', function () {
256256
assert(settings.ignore[0] === 'fixtures', 'ignore');
257257
assert(settings.delay === 5000, 'delay 5 seconds');
258258
assert(settings.runOnChangeOnly, 'run on change only');
259-
assert(settings.ext === 'jade', 'extension is jade');
259+
assert(settings.ext === 'pug', 'extension is pug');
260260
assert(settings.configFile === 'my/.nodemon.json', 'custom config file name is my/.nodemon.json');
261261
assert(settings.signal === 'SIGHUP', 'signal is SIGHUP');
262262
});

test/config/load.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ describe('config load', function () {
9797
assert(config.verbose, 'we are verbose');
9898

9999
// ensure global mapping works too
100-
var options = exec({ script: 'template.jade' }, config.execMap);
101-
assert(options.exec === 'bin/jade template.jade --out /tmp', 'exec used, should be "bin/jade": ' + options.exec);
100+
var options = exec({ script: 'template.pug' }, config.execMap);
101+
assert(options.exec === 'bin/pug template.pug --out /tmp', 'exec used, should be "bin/pug": ' + options.exec);
102102

103103
done();
104104

test/fixtures/global/nodemon.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"verbose": true,
33
"ignore": ["one", "two"],
44
"execMap": {
5-
"jade": "bin/jade {{filename}} --out /tmp"
5+
"pug": "bin/pug {{filename}} --out /tmp"
66
}
7-
}
7+
}

test/fixtures/packages/express4/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"cookie-parser": "~1.0.1",
1313
"body-parser": "~1.0.0",
1414
"debug": "~0.7.4",
15-
"jade": "~1.3.0"
15+
"pug": "~2.0.4",
16+
"pug-cli": "~1.0.0"
1617
}
1718
}

test/fixtures/watch-count/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/monitor/match.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ describe('match', function() {
222222
it('should be specific about directories', function(done) {
223223
config.load(
224224
{
225-
ext: 'js md jade',
225+
ext: 'js md pug',
226226
watch: ['lib'],
227227
},
228228
function(config) {

0 commit comments

Comments
 (0)