CSS.JS
import
able JS files from CSS files and JS files.
Create Usage
$ cssjs --file <CSS file> [--jsFile <JS file for extra functionality>] [--out <output file (preferably with .css.js extension)>]
If out
is not specified, it will print the generated JS to stdout
.
Example
app.css
:
app.css-extensions.js
:
{ elemclassList;}
app.css.js
(generated with cssjs --file app.css --jsFile app.css-extensions.js --out app.css.js
):
// Created by css.js// JavaScript Template { elemclassList;}// CSS Loaderconst styles = `h1 { display: inline; font-weight: bold;}``button { border-radius: 25px;}``.cls { background-color: crimson;}`;const styleElem = document;styleElem;documenthead;styles;