@ibnlanre/atomize
v1.0.0
Published
Extracts all atomic style rules from a given stylesheet
Downloads
2
Maintainers
Readme
Atomize
Atomize extracts all atomic style rules from a given CSS stylesheet. Even if the stylesheet isn't meant for writing atomic styles; atomize makes it possible. It was created to be used in conjunction with ReCSS.
Installation
npm i @ibnlanre/atomize
API
// NodeJS Require
const atomize = require("@ibnlanre/atomize");
// ES6 Import
import atomize from "@ibnlanre/atomize";
const grammar = atomize({
file: "../styles/quantum.css", // the relative path
sep: "_", // separator used for class names in the stylesheet
path: __dirname, // the directory path of the executable
dest: ".", // specifies the destination, if { save: true }
save: true // it is false by default -> ./quantum.js
}) // return an object of { class: property }