Detalhes do pacote

node-sass-import

anarh5kMIT2.0.1

Allows recursive import of SCSS components from local and/or node_modules directories using npm's module resolving algorithm

node-sass-import, sass, scss, import

readme (leia-me)

node-sass-import

npm Build Status Coverage Status js-standard-style

Allows recursive import of SCSS components from local and/or node_modules directories using npm's module resolving algorithm. Without the need for tildes(~) to import from node_modules. 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 import support for partial scss files e.g. _partial.scss

@import "newsapps-styles";

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

API

Version 2+ supports Node 6+ and npm 2+

License

2016 MIT © Emmanuel (Manny) Narh

changelog (log de mudanças)

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.0.0 (2018-04-17)

Bug Fixes

  • chore: removed support for node < 4 and npm < 2 (4acf5c7)

Features

  • added .npmrc to code base (20608f3)
  • chore: removed support for node 0.12 and below (4808b97)
  • chore: upgraded npm dependencies (f0dfa24)
  • updated readme to reflect node and npm support (0a3d263)

BREAKING CHANGES

  • dropped support for node < 4 and npm < 2
  • chore: due to upgrades of components to their major versions.