element-up-theme
v1.5.0
Published
Theme generator cli tool for Element and ElementUp
Downloads
2
Maintainers
Readme
element-up-theme
Theme generator cli tool for Element and ElementUp.
The current version is compatible with [email protected] and [email protected]. For [email protected], please check out the legacy branch.
Installation
install local or global
npm i element-up-theme -D
install up-theme-chalk
npm i element-up-theme-chalk -D
# or from github
npm i https://github.com/savoygu/up-theme-chalk -D
CLI
# init variables file
eut --init [file path]
# watch then build
eut --watch [--config variable file path] [--out theme path]
# build
eut [--config variable file path] [--out theme path] [--minimize]
Node API
var eut = require('element-up-theme')
// watch mode
eut.watch({
config: 'variables/path',
out: 'output/path'
})
// build
eut.run({
config: 'variables/path',
out: 'output/path',
minimize: true
})
Options
config
Variable file path, default ./element-up-variables.css
.
out
Theme output path, default ./up-theme
.
minimize
Compressed file.
browsers
set browsers, default ['ie > 9', 'last 2 versions']
.
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 element-up-theme
by putting it in package.json:
{
"element-up-theme": {
"browsers": ["ie > 9", "last 2 versions"],
"out": "./up-theme",
"config": "./element-up-variables.css",
"theme": "element-up-theme-chalk",
"minimize": false,
"components": ["button", "input"]
}
}
License
MIT