Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
Properly fetch non-bool directives from command line, fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Sep 8, 2013
1 parent 6aba4be commit aef620f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/preprocess
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ for (;i<process.argv.length; i++) {
console.log("Illegal directive: "+process.argv[i]);
process.exit(12);
}
directives[d[0]] = d.length == 1 || d[1].toLowerCase() == "true" || d[1] == "1";
directives[d[0]] = d.length == 1 || d[1].toLowerCase() === "true" || d[1] === "1" || d[1];
}
var source = fs.readFileSync(sourceFile)+"";
var pp = new Preprocessor(source, baseDir);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "preprocessor",
"version": "1.0.3",
"version": "1.0.4",
"author": "Daniel Wirtz <[email protected]>",
"description": "Preprocessor.js: A JavaScript source file preprocessor, e.g. to build different versions of a library.",
"main": "Preprocessor.js",
Expand Down
1 change: 1 addition & 0 deletions tests/issue4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// #put NAME

0 comments on commit aef620f

Please sign in to comment.