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

Commit aef620f

Browse files
committed
Properly fetch non-bool directives from command line, fixes #4
1 parent 6aba4be commit aef620f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

bin/preprocess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ for (;i<process.argv.length; i++) {
4848
console.log("Illegal directive: "+process.argv[i]);
4949
process.exit(12);
5050
}
51-
directives[d[0]] = d.length == 1 || d[1].toLowerCase() == "true" || d[1] == "1";
51+
directives[d[0]] = d.length == 1 || d[1].toLowerCase() === "true" || d[1] === "1" || d[1];
5252
}
5353
var source = fs.readFileSync(sourceFile)+"";
5454
var pp = new Preprocessor(source, baseDir);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "preprocessor",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"author": "Daniel Wirtz <[email protected]>",
55
"description": "Preprocessor.js: A JavaScript source file preprocessor, e.g. to build different versions of a library.",
66
"main": "Preprocessor.js",

tests/issue4.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// #put NAME

0 commit comments

Comments
 (0)