babel-plugin-sass-extract

v0.1.0
Babel plugin for sass-extract. Extract structured variables when requiring sass files.
babel plugin sass-extract sass scss variables convert extract import and 2 more...

babel-plugin-sass-extract

Babel plugin for sass-extract.

Require sass files and get an object containing extracted sass variables. Supports require() and import.

Note that this is an early prototype.

Install

You need to install the sass compiler, sass-extract and the plugin since they are all peer dependencies.

npm install --save node-sass sass-extract babel-plugin-sass-extract

Usage

const styleVariables = require('./styles.scss');
import styleVariables from './styles.scss';

Requirements

  • node-sass >= 3.8.0
  • node >= 4

Contributing

Running tests
npm test
Commits

In order to have readable commit messages and the ability to generate a changelog the commit messages should follow a certain structure.

To make it easier install npm install -g commitizen and commit using git-cz.

Generate changelog using npm install -g conventional-changelog and npm run changelog.

Releasing new versions
  1. Make changes
  2. Commit those changes
  3. Set new version in package.json
  4. npm run changelog
  5. Commit package.json and CHANGELOG.md files
  6. Tag
  7. Push
npm i babel-plugin-sass-extract

Metadata

  • MIT
  • >=4
  • John Granström
  • released 7/14/2017

Downloads

Maintainers