dcodeIO / Preprocessor.js

A JavaScript source file preprocessor in pure JavaScript, e.g. to build different versions of a library.
http://dcode.io
Apache License 2.0
72 stars 19 forks source link

#define + #ifdef don't produce the correct output #18

Open christianfriedl opened 9 years ago

christianfriedl commented 9 years ago

Hi,

in the file testprep.js, I tried the following variations:

// #define var DEBUG=1 (or) // #define DEBUG 1 (or) // #define DEBUG=1

(and then in the same file): // #ifdef DEBUG console.log('debug'); // #else console.log('nodebug'); // #endif

console.log('after');

However, the output is always the same: $ preprocess testprep.js

console.log('nodebug');

console.log('after');

So either I'm completely misinterpreting the intent, or it isn't working

dcodeIO commented 9 years ago

Sorry, this project is not maintained anymore. Give https://github.com/dcodeIO/MetaScript a try!

STAH commented 8 years ago

Or you can use forked version: https://github.com/nashdot/Preprocessor.js