@master/css-cli@master/css-cli
Master CSS CLI
Installation
npm i @master/css-cliAPI Reference
extract [source paths]
Scan source files, extract syntax classes, generate CSS rules, and output as a CSS file. Explicitly specify sources to scan, ignoring options.include and options.exclude restrictions.
| Type | FastGlobPattern[] |
|---|
mcss extract index.html main.jsIf no sources are specified, by default, all directories of your current project will be scanned according to options.include and options.exclude.
mcss extractThe command runs according to the preset extractor options.
extract -o, --output <path>
Watch for file changes and build continuously.
| Type | string |
|---|---|
| Default | 'master.css' |
mcss extract --output master.cssextract --options <path>
Specifies the source of the extractor options.
| Type | string |
|---|---|
| Default | 'master.css-extractor.*' |
mcss extract --option dir/master.css-extractor.jsextract -v, --verbose
Verbose logging.
| Type | number |
|---|---|
| Default | 1 |
Set to 0 to silence the terminal.
mcss extract --verbose 0extract -w, --watch
Watch for file changes and build continuously.
| Type | boolean |
|---|---|
| Default | false |
mcss extract --watchrender [source paths]
The path in glob patterns of the source of the HTML file
| Type | FastGlobPattern[] |
|---|
mcss render "**/*.html"render -c, --config <path>
The source path of the Master CSS configuration.
| Type | string |
|---|---|
| Default | 'master.css.*' |
mcss render "**/*.html" --config dir/master.css.jsrender -a, --analyze
Analyze injected CSS and HTML size ( brotli ) without writing to file
| Type | boolean |
|---|---|
| Default | false |
mcss render "**/*.html" --analyze