Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/subsetcss/config-helpers


https://github.com/subsetcss/config-helpers

css helpers less linting sass subsetcss utilities

Last synced: 9 days ago
JSON representation

Awesome Lists containing this project

README

        

# @subsetcss/config-helpers

Helpers for building out `.subsetcss.js` config files.

## Available helpers

### `getVariables`

```js
const { getVariables } = require('@subsetcss/config-helpers');

let colors = getVariables('app/styles/variables.scss');
// colors = [
// { key: '$primary': value: 'red' },
// { key: '$secondary': value: 'blue' }
// ]

module.exports = {
subsets: {
color: colors.map(c => c.key)
}
};
```

Works for files ending in `.scss` and `.less`.

## Contributing

Check out the [Contributing guide](CONTRIBUTING.md).