style2js
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Style2js

Generate helpers to inject your css into the dom when no css loader is available.

For example the command below will output 3 files into your dist folder

style2js style.min.css --out-dir ./dist
|_ inject-style.js
|_ inject-style.esm.js
|_ inject-style.d.ts

When someone use your library, he can do the following to load the css

import { injectStyle } from "your-library/inject-style";
// inject the stylesheet into the dom
injectStyle();

Installation

You can install the package with npm or yarn

npm i style2js
// with yarn
yarn add style2js

Or use it directly via npx

npx style2js

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • beta
  • 1.0.3
    24
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    24
  • 1.0.2
    1
  • 1.0.1
    149
  • 1.0.0
    3
  • 0.0.1
    0

Package Sidebar

Install

npm i style2js

Weekly Downloads

173

Version

1.0.3

License

MIT

Unpacked Size

8.98 kB

Total Files

9

Last publish

Collaborators

  • sniphpet