1.0.0 • Published 3 years ago

@ibnlanre/atomize v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Atomize

TypeScript code style: prettier version Twitter


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 }