Skip to content

Commit

Permalink
馃悰 rebuild command line argument does not work
Browse files Browse the repository at this point in the history
The reason is that we are using multiple commands in 'npm run build'.
So the actual command is:

npm run lint && node npm/build.js && npm run test "--rebuild"
  • Loading branch information
ggrossetie committed Jan 23, 2018
1 parent 2172991 commit 5f98ae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions npm/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Builder.prototype.build = function (callback) {
Builder.prototype.rebuild = function (callback) {
const target = 'build/asciidoctor-lib.js';
const args = process.argv.slice(2);
if (fs.existsSync(target) && !args.includes('--rebuild')) {
log.info(`${target} file already exists, skipping "rebuild" task.\nTIP: Use "npm run build -- --rebuild" to rebuild from Asciidoctor core.`);
if (fs.existsSync(target)) {
log.info(`${target} file already exists, skipping "rebuild" task.\nTIP: Use "npm run clean" to rebuild from Asciidoctor core.`);
callback();
return;
}
Expand Down

0 comments on commit 5f98ae6

Please sign in to comment.