https://github.com/ReactiumCore/node-sass-reactium-importer
A node-sass custom importer for Reactium projects
https://github.com/ReactiumCore/node-sass-reactium-importer
Last synced: 8 months ago
JSON representation
A node-sass custom importer for Reactium projects
- Host: GitHub
- URL: https://github.com/ReactiumCore/node-sass-reactium-importer
- Owner: ReactiumCore
- License: mit
- Created: 2021-01-28T19:05:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-28T19:08:24.000Z (over 5 years ago)
- Last Synced: 2024-12-19T00:42:52.709Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# @atomic-reactor/node-sass-reactium-importer
A node-sass custom importer which turns ~ into absolute paths to the nearest parent node_modules directory and turns + into absolute paths to the nearest parent reactium_modules directory.
## Install
```sh
npm install --save-dev @atomic-reactor/node-sass-reactium-importer
```
## Usage
```js
var sass = require('node-sass');
var reactiumImporter = require('@atomic-reactor/node-sass-reactium-importer');
var result = sass.renderSync({
data: scss_content,
importer: reactiumImporter,
});
```
`scss example`
```css
@import '+@atomic-reactor/toolkit/src/style/rtk';'
@import '~@atomic-reactor/reactium-ui/assets/style/reactium-ui';
```
`node-sass` cli example:
```sh
node-sass style.scss --importer=node_modules/node-sass-reactium-importer
```
Please refer to the node-sass [readme](https://github.com/sass/node-sass#readme) for full instruction on how to use custom importers.