Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gtap-dev/cottonmouth
An asset dependency sorting system for Fractal.
https://github.com/gtap-dev/cottonmouth
Last synced: about 2 months ago
JSON representation
An asset dependency sorting system for Fractal.
- Host: GitHub
- URL: https://github.com/gtap-dev/cottonmouth
- Owner: gtap-dev
- Created: 2017-01-22T03:53:03.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2020-06-13T08:32:04.000Z (over 4 years ago)
- Last Synced: 2024-11-03T01:03:24.505Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cottonmouth
An asset dependency sorting system for Fractal.
## usage
1. Install the package: `npm install @gotoandplay/cottonmouth --save`.
2. Require the package: `const cottonmouth = require('@gotoandplay/cottonmouth');`
3. Use it:```
cottonmouth({
fractal: fractal, // reference your fractal instance
components: ['icon', 'button'], // collect dependencies for a specified set of components
tag: 'main', // collect dependencies for all components that have this tag
prependComponents: ['reset', 'typography'], // required components that should be prepended
appendComponents: ['helper'], // required components that should be appended
sortAssets: ['scss', 'js'] // asset types (extensions) that should be searched for and sorted
}
).then((dependencies) => {
// to stuff with returned dependencies object
}
);
```