@geoapps/sass2css

Converting library SASS to CSS

Usage no npm install needed!

<script type="module">
  import geoappsSass2css from 'https://cdn.skypack.dev/@geoapps/sass2css';
</script>

README

@geoapps/sass2css

This tool is created to convert input SASS file to output CSS file with proper importer function allowing to use ~ in imported modules' names.

Installation

npm install @geoapps/sass2css --dev
yarn add @geoapps/sass2css --dev

Usage

  • CLI:

    sass2css --base-path /path/to/project/root/dir
    
  • Programmatic:

    const sass2css = require('@geoapps/sass2css');
    sass2css({
      basePath: '/path/to/project/root/dir'
    });
    

Options

Here is a list of all available options for CLI (programmatic) usage:

  • --base-path (basePath) Path of base directory to resolve everything to (default is . meaning directory of CLI execution, usually it's a root directory of repository).
  • --input-dir-name (inputDirName) Relative path to input directory (default is src/sass).
  • --input-file-name (inputFileName) Name of input SASS file (default is index.sass).
  • --input-img-dir-name (inputImgDirName) Relative path to directory with source images (default is src/img).
  • --output-dir-name (outputDirName) Relative path to output directory (default is dist/css).
  • --output-img-dir-name (outputImgDirName) Relative path to output directory for images (default is dist/img).
  • --modes (modes) Output modes (default is ['development', 'production']).

Changelog

List of code changes for each version is available.