sass-dynamic-imports
v1.1.1
Published
import dynamically sass files
Downloads
17
Readme
Sass Dynamic imports
The library is designed to import dynamically scss files in dynamic folders.
Install Sass
Sass library is required to use this package
npm i sass
Install library
npm i -g sass-dynamic-imports
Use watcher
dynamic-sass --watch path/file.scss:path/file.css
Use with concurrently
npm i concurrently
Add this scripts on your package.json "scripts" key:
"scripts": {
"dev:sass": "dynamic-sass --watch styles/index.scss:styles/index.css",
"dev": "concurrently --kill-others \"next dev\" \"npm run dev:sass\"",
}
Usage
in scss file:
@import './[folder_name]/**/*.scss';
will watch all scss files on any folder on [folder_name] folder
.class {
color: env(VARIABLE)
}
will use env Variable
@minimify;
will minimify css file