Closed morty closed 4 years ago
In the README one of the the examples is:
var fingerprint = '<!-- @echo COMMIT_HASH -->' || 'DEFAULT';
When COMMIT_HASH is set to 0xDEADBEEF it should process to
COMMIT_HASH
0xDEADBEEF
var fingerprint = '0xDEADBEEF' || 'DEFAULT';
and when COMMIT_HASH is unset it should process to:
var fingerprint = '' || 'DEFAULT';
However when I try this I get
var fingerprint = 'undefined' || 'DEFAULT';
which does not do as expected.
The code I have been running is:
var pp = require('preprocess'); var text = "var fingerprint = '<!-- @echo COMMIT_HASH -->' || 'DEFAULT';"; console.log(pp.preprocess(text, {}, {type: 'html'}));
I am using preprocess 3.1.0 have tried nodejs versions v4.2.6 and v6.2.1.
In the README one of the the examples is:
When
COMMIT_HASH
is set to0xDEADBEEF
it should process toand when
COMMIT_HASH
is unset it should process to:However when I try this I get
which does not do as expected.
The code I have been running is:
I am using preprocess 3.1.0 have tried nodejs versions v4.2.6 and v6.2.1.