@appius-digital/task-build-styles

3.0.1 • Public • Published

Appius Build Tool: Build Styles

Use this tool to process SCSS into production-ready CSS as part of your build process.

Installation

Run the following command from your project root.

npm install @appius-digital/task-build-styles --save

Usage

Add the following to your gulpfile.js

require('@appius-digital/task-build-styles')(gulp, {
  task: 'build-styles',
  src: ['src/css/main.scss'],
  dest: 'dist/css' });

Options

Name Type Required Default Description
task String No 'build-styles' The name of the task to be initialised
src Array Yes The globs to be processed
dest String Yes Directory to place the processed files
plugins.autoprefixer.enabled Boolean No true Enable or disable autoprefixer
plugins.autoprefixer.config Object No {} A set of autoprefixer options
plugins.cssnano.enabled Boolean No true Enable or disable cssnano (minifier)
plugins.cssnano.config Object No {} A set of cssnano options
plugins.sourcemaps.enabled Boolean No true Enable or disable sourcemaps
plugins.sass.enabled Boolean No true Enable or disable sass
plugins.sass.config Object No { precision: 5, outputStyle: 'expanded' } A set of node-sass options

Configuration

In addition to any optional configuration applied to the individual plugins, autoprefixer will take the list of supported browsers from browserslist property the package.json file. For example:

"browserslist": "last 2 version, iOS >= 8, Android >= 4.4, ie >= 10"

Copyright and license

Code and documentation Copyright 2019 Appius. Code released under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i @appius-digital/task-build-styles

Weekly Downloads

4

Version

3.0.1

License

UNLICENSED

Unpacked Size

7.51 kB

Total Files

4

Last publish

Collaborators

  • appius-john
  • appius-phil
  • appius-rich