gap-node-scss

2.0.5 • Public • Published

Gap Node SCSS

Install

yarn add gap-node-scss

Usage

const scss = require('gap-node-scss');
 
scss.build({
    inputDir: '/path/to/scss/dir',
    outputDir: '/path/to/css/dir',
    includePaths: [
        '/path/to/lib',
        '/path/to/mod'
    ],
    sourceMap: true,
    outputStyle: 'expanded' // nested, expanded, compact, compressed
});
const express = require('express');
const path = require('path');
const scss = require('gap-node-scss');
 
const app = express();
const port = '8007';
const publicSlug = 'css';
 
app.use('/' + publicSlug, scss.middleware({
    inputDir: path.resolve(__dirname, 'src/scss'),
    outputDir: path.resolve(__dirname, 'dev/css'),
    includePaths: [
        path.resolve(__dirname, 'module/scss/normalize-scss/')
    ],
    sourceMap: true,
    outputStyle: 'expanded' // nested, expanded, compact, compressed
}));
 
app.listen(port, function () {
    console.log('Front server listening on port ' + port + '!');
});

More examples check: https://github.com/gaptree/gap-node-scss/tree/master/test

Readme

Keywords

Package Sidebar

Install

npm i gap-node-scss

Weekly Downloads

1

Version

2.0.5

License

ISC

Unpacked Size

8.13 kB

Total Files

17

Last publish

Collaborators

  • captainxu
  • cyjme
  • patrickstar
  • weiwenqiang
  • zhanjh