Skip to content

lwdgit/fis-parser-sass2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fis-parser-sass2 NPM version

NPM Download

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
//fis-conf.js

fis.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');
//fis3-conf.js
fis.match('**.scss', {
    parser: fis.plugin('sass2', {
        define: {
            'enable': true,
            '$bgcolor': '#d8222d',
            '$color': 'black'
        }
    }),
    rExt: 'css'
})
//example a.scss
@if ($enable) {
    body {
        background: $bgcolor;
        color: $color;
    }
}
$ fis release -d ./output

About

A parser plugin for fis to compile scss file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published