1.0.2 • Published 3 years ago

@slim-css/scss-tools v1.0.2

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

Slim-scss-tools

slim-scss-tools is a great tool that provides you with a set of scss files (containing scss/css variables, mixins, functions, and extensions used by the components and elements that make up the slim-css core) and a command line tool to easily build and develop plugins and graphic designs for the slim-css framework.

Table of contents

Quick install

NPM

npm i -D @slim-css/scss-tools

or

Yarn

yarn add -D @slim-css/scss-tools

Import slim-scss-tools

In your own scss file (example.scss) you can include the scss tools from slim-core as follows

// ./scss/example.scss

@import  "../node_modules/@slim-css/scss-tools/src/tools_components/all";

Use slim-scss-cli

Create .slimrc.js

To use slim-scss-cli, you must first create a configuration file named .slimrc.js whose content will look like the following

// .slimrc.js

module.exports = {
    pluginName: 'plugin_name', // A plugin name
    source: './scss', // the source directory path that contains the scss files
    output: './css', // the output directory path that will contain the css files
    entryFilename: 'plugin_name', // name of the scss input file that will be compiled
}

Set package

Add to your package.json the following lines of code

"scripts": {
	"build": "slim-cli sass && slim-cli group && slim-cli prefix && slim-cli cleancss",
	"dev": "npm run sass -- --watch",
	"prod": "slim-cli clean && npm run build"
}
  • dev: compile at each modification your scss entrypoint in compact css with map file
  • build: compile at each modification your scss entrypoint in minified css
  • prod: clean up the css output folder before building the scss entry point (very useful for the plugin production)

Command line reference

CommandsFunctions
cleanClean css folder
sassRun sass compiler
cleancssRemove css files in css folder
groupGroup css media querie
prefixAuto prefix css attribute

Copyright and license

Code copyright 2021 SOCGNA KOUYEM Childéric. Code released under the MIT license.

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0-beta3

3 years ago

1.0.0-beta2

3 years ago

1.0.0

3 years ago

1.0.0-beta1

3 years ago

1.0.0-alpha9

3 years ago

1.0.0-alpha8

3 years ago

1.0.0-alpha7

3 years ago

1.0.0-alpha6

3 years ago

1.0.0-alpha5

3 years ago

1.0.0-alpha4

3 years ago

1.0.0-alpha3

3 years ago

1.0.0-alpha2

3 years ago