https://github.com/lwdgit/fis-parser-js-macro
A simple js macro for fis & fis3
https://github.com/lwdgit/fis-parser-js-macro
Last synced: 15 days ago
JSON representation
A simple js macro for fis & fis3
- Host: GitHub
- URL: https://github.com/lwdgit/fis-parser-js-macro
- Owner: lwdgit
- License: mit
- Created: 2015-08-13T08:57:37.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-01T14:18:02.000Z (almost 11 years ago)
- Last Synced: 2025-02-18T22:05:03.867Z (over 1 year ago)
- Language: JavaScript
- Size: 164 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# A simple js macro for fis & fis3
## Install
npm install -g fis-parser-js-macro
## Demo
```javascript
{{if (define.product=='mobile')}}
console.log("true");
{{if (true)}}
console.log('fsdffs')
{{if (!false)}}console.log('false'){{else}}
console.log('success');
{{/if}}
console.log('fsdffs true')
{{/if}}
{{else if (2==12)}}
console.log('hello');
{{else if (3==3)}}
console.log("false");
var c='1';
{{/if}}
```
```javascript
//fis3-conf
fis.match('**.js', {
parser: fis.plugin('js-macro', {
define: {
product: 'mobile'
}
})
});
```