A compiler for scss and sass files to css
Install the package using npm or yarn as a dev dependency.
npm install --save-dev node-sass-compiler
yarn add --dev node-sass-compiler
sass-compiler
This command will compile all the scss and sass files in the .
directory and will output the css files in the same directory.
For customize the input and output directories you must create a sass-compiler.config.js
file in the root of your project.
module.exports = {
entries: [
{
baseDir: './src/app/scss',
outputDir: './src/app/css',
}
]
}
It replies the directory structure of the baseDir
directory in the outputDir
directory.
You can create multiple entries to compile multiple directories.
If you don't want to run the command every time you make a change in the scss files, you can use the --watch
flag.
sass-compiler --watch
-
--watch
: Watch the files for changes and recompile them on the fly. -
--config
: Specify the path to the configuration file. By default, it will look for asass-compiler.config.js
file in the root of your project. -
--verbose
: Show more information about the compilation process. -
--version
or-v
: Show the version of the package. -
--help
or-h
: Show the help message.
Juan Carlos Martínez - juancarlosmartinez