@keops-society/sass-compiler

1.0.1 • Public • Published

SassCompiler

An utility for generating css from scss files


Installation

# install locally (recommended)
npm install @keops-society/sass-compiler --save

Usage

  • Create a css and sass directories in your project

1 Using in code

To use from code each time your application runs:

//import
const compileSassFiles = require('sass-compiler');

//define some paths
const DIR_SASS_FILES = path.join(__dirname, 'sass');
const DIR_SASS_OUTPUT = path.join(__dirname, 'css');

//compile sass files
try {
    compileSassFiles(DIR_SASS_FILES, DIR_SASS_OUTPUT);
} catch (error) {
    return console.error('Unable compile sass files: ' + error);
}

2 Using from terminal

If you don't want to add sass logic in your code:

npx sass-compiler <input-dir> <output-dir>

Package Sidebar

Install

npm i @keops-society/sass-compiler

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.74 kB

Total Files

4

Last publish

Collaborators

  • ignite-coders