https://github.com/lwdgit/fis-parser-sass2
A parser plugin for fis to compile scss file.
https://github.com/lwdgit/fis-parser-sass2
Last synced: 7 months ago
JSON representation
A parser plugin for fis to compile scss file.
- Host: GitHub
- URL: https://github.com/lwdgit/fis-parser-sass2
- Owner: lwdgit
- Created: 2015-06-11T06:14:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-30T12:54:07.000Z (over 9 years ago)
- Last Synced: 2024-11-13T17:49:27.314Z (8 months ago)
- Language: JavaScript
- Size: 10.7 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fis-parser-sass2 
[](https://www.npmjs.org/package/fis-parser-sass2)
A parser plugin for fis to compile sass file.
(基于node-sass的fis插件,支持expanded,及预定义变量。本插件基于fis官方插件修改,不过依赖库由```fis-sass```更改为```node-sass```)
## install
$ npm install -g fis-parser-sass2
```javascript
//fis-conf.jsfis.config.set('modules.parser.scss', 'sass2');
fis.config.set('settings.parser.sass2.define', {
'enable': true,
'$bgcolor': '#d8222d',
'color': 'black'
});
//你可以通过设置该属性来控制sass文件里的的变量fis.config.set('settings.parser.sass2.outputStyle', 'expanded');
//the default is expanded,默认为expanded,你可以手动设置其他属性fis.config.set('settings.parser.sass2.sourceMap', false);
//use sourcemap or not, default is true,是否启用sourceMap,默认为开启fis.config.set('roadmap.ext.scss', 'css');
```
```javascript
//fis3-conf.js
fis.match('**.scss', {
parser: fis.plugin('sass2', {
define: {
'enable': true,
'$bgcolor': '#d8222d',
'$color': 'black'
}
}),
rExt: 'css'
})
``````scss
//example a.scss
@if ($enable) {
body {
background: $bgcolor;
color: $color;
}
}
```$ fis release -d ./output