1.0.2 • Published 5 months ago

pandora-css-variables v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

pandora-css-variables

generate css variables file from file globalVarFile and preserves variables of file varFile.

Install

$ npm install -D pandora-css-variables

Usage

const generateCssVariables = require('pandora-css-variables');

const options = {
  varFile: path.join(__dirname, './src/styles/variables.less'), // include all color variables in `varFile` that you want to change dynamically
  globalVarFile: path.join(__dirname, './src/styles/global-variables.less'), // the less variables in the file will generate css variables. For example, if @primary-1 is defined in the file, --primary-1 will be added to the output.
  outputFilePath: path.join(__dirname, './public/color.less'), // if provided, file will be created with generated less/styles
  options: {}, // (Optional) less options
  themeReplacement: {} // (Optional) the variables that need to replace the variables in `varFile`
}

generateCssVariables(options);
1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago