Comparing version 1.0.0-alpha3 to 1.0.0-alpha4
@@ -5,2 +5,10 @@ # Change Log | ||
## [1.0.0-alpha4] - 2016-05-18 | ||
### Changed | ||
- When `--watch` is specified, `watch` is no longer passed as an option to Pug. This should have no effect on users. | ||
### Fixed | ||
- Fixed `--no-debug` option ([#23]) | ||
## [1.0.0-alpha3] - 2016-05-18 | ||
@@ -64,3 +72,4 @@ | ||
[unreleased]: https://github.com/pugjs/pug-cli/compare/1.0.0-alpha3...master | ||
[unreleased]: https://github.com/pugjs/pug-cli/compare/1.0.0-alpha4...master | ||
[1.0.0-alpha4]: https://github.com/pugjs/pug-cli/compare/1.0.0-alpha3...1.0.0-alpha4 | ||
[1.0.0-alpha3]: https://github.com/pugjs/pug-cli/compare/1.0.0-alpha2...1.0.0-alpha3 | ||
@@ -71,1 +80,3 @@ [1.0.0-alpha2]: https://github.com/pugjs/pug-cli/compare/1.0.0-alpha1...1.0.0-alpha2 | ||
[0.1.0]: https://github.com/pugjs/pug-cli/compare/0.0.1...0.1.0 | ||
[#23]: https://github.com/pugjs/pug-cli/issues/23 |
38
index.js
@@ -105,22 +105,12 @@ #!/usr/bin/env node | ||
// --path | ||
[ | ||
['path', 'filename'], // --path | ||
['debug', 'compileDebug'], // --no-debug | ||
['client', 'client'], // --client | ||
['pretty', 'pretty'], // --pretty | ||
['doctype', 'doctype'], // --doctype | ||
].forEach(function (o) { | ||
options[o[1]] = program[o[0]] !== undefined ? program[o[0]] : options[o[1]]; | ||
}); | ||
options.filename = program.path || options.filename; | ||
// --no-debug | ||
options.compileDebug = program.debug || options.compileDebug; | ||
// --client | ||
options.client = program.client || options.client; | ||
// --pretty | ||
options.pretty = program.pretty || options.pretty; | ||
// --watch | ||
options.watch = program.watch; | ||
// --name | ||
@@ -132,6 +122,2 @@ | ||
// --doctype | ||
options.doctype = program.doctype || options.doctype; | ||
// --silent | ||
@@ -157,3 +143,3 @@ | ||
consoleLog(); | ||
if (options.watch) { | ||
if (program.watch) { | ||
process.on('SIGINT', function() { | ||
@@ -265,3 +251,3 @@ process.exit(1); | ||
// Try to watch the file if needed. watchFile takes care of duplicates. | ||
if (options.watch) watchFile(path, null, rootPath); | ||
if (program.watch) watchFile(path, null, rootPath); | ||
if (program.nameAfterFile) { | ||
@@ -273,3 +259,3 @@ options.name = getNameFromFileName(path); | ||
: pug.compileFile(path, options); | ||
if (options.watch && fn.dependencies) { | ||
if (program.watch && fn.dependencies) { | ||
// watch dependencies, and recompile the base | ||
@@ -276,0 +262,0 @@ fn.dependencies.forEach(function (dep) { |
{ | ||
"name": "pug-cli", | ||
"version": "1.0.0-alpha3", | ||
"version": "1.0.0-alpha4", | ||
"description": "Pug's CLI interface", | ||
@@ -5,0 +5,0 @@ "bin": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39139
15
777