@union/node-sass-import
Allows usage of @include (of .scss) akin to require (of .js) in node.js
Last updated 4 years ago by union .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @union/node-sass-import 
SYNC missed versions from official npm registry.

node-sass-import

npm Build Status Coverage Status js-standard-style

Allows usage of @import "some-sass-npm-module" akin to require("some-npm-module") in node.js

Install

$ npm install --save node-sass-import

Usage

Used in conjunction with node-sass. In a simple npm-only build setup, the example below in package.json should suffice.

{
  "name": "your-package",
  "description": "fun package",
  "main": "index.js",
  "scripts": {
    "build-css": "node-sass test.scss dist/test.css --importer node_modules/node-sass-import"
  }
}

You can now build your scss files as follows

$ npm run build-css

Example

@import in sass can now be used just like a require statement. The example below imports the main scss file from the newsapps-syles npm module. At build time, all @import statements will be resolved locally or like npm modules. Also includes support for partial (e.g. _partial.scss).

@import "newsapps-styles";

.some-style {
  color: $primary-blue;
}

API

Coming soon...

License

2016 MIT © Emmanuel (Manny) Narh

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

1 Versions

  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (6)
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |