stylr-sass

1.0.4 • Public • Published

Stylr

Node Sass builder

Installation

  1. To install Stylr just clone our repository in your project via git clone git@github.com:apibest/stylr.git
  2. After cloning repository open its directory and install all dependencies via npm install. If the error will has been occured retry last command with rights of superuser.
  3. Done! module is ready to build your Sass files

Configuration

Configuration file is presented as JSON-file .stylrrc that should be created in the root directory of Stylr module. Configuration file should contain the following properties:

  • sources - Array representing the list of sources from which Sass would be merged in temporary folder;
  • destination - String path to destination file (where compiled styles should be stored);
  • inputFile - String path to the main Sass file (where all imports begin);
  • temp - String title of the temporary folder will be created;
  • outputStyle - String defining output style of the compiled Sass files (compressed to minify);
  • sourceMap - String path to sourcemap file.

Running

To make Stylr build styles run the following command: node index.js in the Stylr folder

Example

The following config file describes project containing Sass sources consisting from two modules module1 and module2 that should be compiled, minified and stored in the file main.css with appropriate sourcemaps in assets/css folder. Temporary folder in which will be merged all styles has the name .tmp

{
  "sources": [
        "../module1/src/styles",
        "../module2/src/styles"
      ],
  "destination": "../assets/css/main.css",
  "inputFile": "main.scss",
  "temp": ".tmp",
  "outputStyle": "compressed",
  "sourceMap": "../assets/css/maps/main.map"
}

Readme

Keywords

none

Package Sidebar

Install

npm i stylr-sass

Weekly Downloads

1

Version

1.0.4

License

Apache-2.0

Last publish

Collaborators

  • apibest
  • thebeatcoder