Giter Club home page Giter Club logo

fis-parser-sass's Introduction

fis-parser-sass

安装与使用

全局安装

npm install fis-parser-sass -g

开启插件

fis.config.merge('modules.parser', {
    sass : 'sass',
    scss: 'sass'
});

fis.config.merge('roadmap.ext', {
    sass: 'css',
    scss: 'css'
});

插件配置

fis.config.set('settings.parser.sass', {
    // 加入文件查找目录
    include_paths: []
});

在项目中使用sass和compass

有了 fis-parser-sass 就可用用compass了,方法如下:

  1. 安装 fis-parser-sass 插件:

    npm install -g fis-parser-sass
  2. 下载 compass 框架,把框架中的 frameworks/compass/stylesheets 目录下的文件放到你的项目中,得到目录结构:

    project
      ┣ compass
      ┣ _compass.scss
      ┣ _lemonade.scss
      ┗ fis-conf.js
    
  3. 配置fis

    //项目排除掉_xxx.scss,这些属于框架文件,不用关心
    fis.config.set('project.exclude', '**/_*.scss');
    //scss后缀的文件,用fis-parser-sass插件编译
    fis.config.set('modules.parser.scss', 'sass');
    //scss文件产出为css文件
    fis.config.set('roadmap.ext.scss', 'css');
  4. 新建一个 scss 文件测试一下:

    @import "compass/layout/grid-background";
    
    a {
        background: get-baseline-gradient($color:255);
        font-weight: bold;
        text-decoration: none;
        &:hover { text-decoration: underline; }
        body.firefox & { font-weight: normal; }
    }
  5. fis release -d output

  6. 文件编译结果

    a {
      background: linear-gradient(bottom, #f00 5%, rgba(255, 0, 0, 0) 5%);
      font-weight: bold;
      text-decoration: none; }
      a:hover {
        text-decoration: underline; }
      body.firefox a {
        font-weight: normal; }

fis-parser-sass's People

Contributors

2betop avatar fouber avatar hefangshi avatar ksky521 avatar lildemon avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.