Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ElementUI/element-theme
Theme generator cli tool for Element.
https://github.com/ElementUI/element-theme
Last synced: 9 days ago
JSON representation
Theme generator cli tool for Element.
- Host: GitHub
- URL: https://github.com/ElementUI/element-theme
- Owner: ElementUI
- License: mit
- Created: 2016-11-01T10:09:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T09:16:14.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T20:37:39.555Z (15 days ago)
- Language: JavaScript
- Size: 221 KB
- Stars: 494
- Watchers: 21
- Forks: 142
- Open Issues: 63
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - ElementUI/element-theme - Theme generator cli tool for Element. (JavaScript)
- awesome - ElementUI/element-theme - Theme generator cli tool for Element. (JavaScript)
README
# element-theme
[![Build Status](https://travis-ci.org/ElementUI/element-theme.svg?branch=master)](https://travis-ci.org/ElementUI/element-theme)
[![npm](https://img.shields.io/npm/v/element-theme.svg)](https://www.npmjs.com/package/element-theme)> Theme generator cli tool for Element.
![](./media/element.gif)
> The current version is compatible with [email protected]. For [email protected], please check out the legacy branch.
## Installation
install local or global
```shell
npm i element-theme -D
```install `theme-chalk`
```shell
npm i element-theme-chalk -D
# or from github
npm i https://github.com/ElementUI/theme-chalk -D
```## CLI
```shell
# init variables file
et --init [file path]# watch then build
et --watch [--config variable file path] [--out theme path]# build
et [--config variable file path] [--out theme path] [--minimize]
```## Node API
```javascript
var et = require('element-theme')// watch mode
et.watch({
config: 'variables/path',
out: 'output/path'
})// build
et.run({
config: 'variables/path',
out: 'output/path',
minimize: true
})
```## Options
### config
Variable file path, default `./element-variables.css`.### out
Theme output path, default `./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-theme` by putting it in package.json:
```json
{
"element-theme": {
"browsers": ["ie > 9", "last 2 versions"],
"out": "./theme",
"config": "./element-variables.css",
"theme": "element-theme-chalk",
"minimize": false,
"components": ["button", "input"]
}
}
```## License
MIT