Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/subsetcss/config-helpers
- Owner: subsetcss
- Created: 2019-08-03T18:52:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T19:27:09.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T17:22:27.128Z (about 1 month ago)
- Topics: css, helpers, less, linting, sass, subsetcss, utilities
- Language: TypeScript
- Size: 773 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
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).