wui-theme-cli
Theme generator cli tool for WinUI.
Installation
install local or global
# partial
npm i @winner-fed/wui-theme-cli -D
# global
npm i @winner-fed/wui-theme-cli -g
install @winner-fed/wui-theme-redness
npm i @winner-fed/wui-theme-redness -D
CLI
# init variables file
wt --init [file path]
# watch then build
wt --watch [--config variable file path] [--out theme path]
# build
wt [--config variable file path] [--out theme path] [--minimize]
Node API
var wt = require('@winner-fed/wui-theme-cli')
// watch mode
wt.watch({
config: 'variables/path',
out: 'output/path'
})
// build
wt.run({
config: 'variables/path',
out: 'output/path',
minimize: true
})
Options
config
Variable file path, default ./win-ui-variables.css
.
out
Theme output path, default ./theme
.
minimize
Compressed file.
browsers
set browsers, default ['iOS >= 8', 'Android >= 4.0']
.
watch
watch variable file changes then build.
components
A lists of components that you want to generate themes for. All by default.
Config
You can configure some options in @winner-fed/wui-theme-cli
by putting it in package.json:
{
"@winner-fed/wui-theme-cli": {
"browsers": ["iOS >= 8", "Android >= 4.0"],
"out": "./theme",
"config": "./win-ui-variables.less",
"theme": "@winner-fed/wui-theme-redness",
"minimize": false,
"components": ["field", "cell"]
}
}