element-theme

Theme generator cli tool for Element
41,664 498
Install
npm install element-theme
Latest Version:2.0.1
License:MIT
Last Updated:Dec 7, 2022
Links: GitHub  ·  npm
Maintainer: yi.yang

element-theme

Build Status npm

Theme generator cli tool for Element.

The current version is compatible with element-ui@2.x. For element-ui@1.x, please check out the legacy branch.

Installation

install local or global

npm i element-theme -D

install theme-chalk

npm i element-theme-chalk -D
# or from github
npm i https://github.com/ElementUI/theme-chalk -D

CLI

# 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

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:

{
  "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

Related Packages

mui-theme

Theme generator cli tool for Element

6,945 498
element-themex

Theme generator cli tool for Element

3,101 498
vue-cli-plugin-element-ui

element-ui plugin for vue-cli

14,586 14
@ncform/ncform-theme-elementui

ncform theme element-ui

6,175
vue-cli-plugin-element

vue-cli 3 plugin to add element-ui

177,437 821

Version History

Version Released License
2.0.1 MIT
2.0.0 MIT
0.7.2 MIT
0.7.1 MIT
0.7.0 MIT