Generate user.css and user.js from CSS input
npm install userstyle-gen#userstyle-gen
> WIP: This is a get-something-working release that is just a partially implemented script. It needs to be refactored, modularized, tested, covered, & smothered.
---
shell
npm install userstyle-gen --save-dev
`
css2userstyle
Convert CSS to userstyles (user.css) and userscripts (user.js)
`shell
css2userstyle [options]
`
$3
This script takes a CSS file as input, along with metadata that describes the style, and produces userstyle (user.css) and userscript (meta.js & user.js) files for distributing themes.
The metadata for the style is supplied from a userstyle.json file in the current directory and/or from the package.json file. For each known metadata attribute, it looks first in userstyle.json, then for a _"userstyle"_ key in package.json, finally at the top level of the package.json, taking the first value found in that search order.
See userstyle to learn more about the metadata json format.
$3
- basename
Normally, the output filename is derived from the name of the source file. You can change the base part of the filename, excluding the path, by specifying the --basename` option.