npm.io
1.1.1 • Published 2 years agoCLI

sass-dynamic-imports

Licence
ISC
Version
1.1.1
Deps
11
Size
14 kB
Vulns
0
Weekly
0
Stars
3

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

Keywords