rollup-plugin-if
Install
$ npm install rollup-plugin-
Syntax
#[keyword] [expression]
// javascript code goes here
#end[keyword]
Usage
;; ;
Statements
if
#if FLAGwindowa = 1;#endif windowb = 2;
will yeild:
windowa = 1;windowb = 2;
if-else-endif
#if FLAGwindowa = 1;#elsewindowa = 2;#endif
will yeild:
windowa = 1;
if-elif-else-endif
#if FLAG1windowa = 1;#elif FLAG2windowb = 2;#elsewindowc = 3;#endif
will yeild:
windowc = 3;
License
MIT © BinRui.Guan