theme-zero

0.0.2 • Public • Published

theme-zero

Build Status npm

Theme generator cli tool.

Installation

install local or global

npm i theme-zero -D

CLI

# init variables file 
tz --init [file path]
 
# watch then build 
tz --watch [--vars variables file name] [--out output theme path] [--name output theme name]
 
# build 
tz [--theme default theme path] [--vars variables file name] [--out output theme path] [--name output theme name] [--minimize]

Node API

var tz = require('theme-zero');
 
// watch mode
tz.watch({
  themeVars: 'variables.less',
  outPath: './src/styles/theme-custom',
  outName: 'theme-custom',
});
 
// build
et.run({
  themePath: './src/styles/theme-default',
  themeVars: 'variables.less',
  outPath: './src/styles/theme-custom',
  outName: 'theme-custom',
  minimize: true,
});

Options

themePath

Default theme path, default ./src/styles/theme-default.

themeVars

Variable file name, default variables.css.

outPath

Theme output path, default ./src/styles/theme-custom.

outName

Theme output name, default theme-custom.

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 theme by putting it in package.json:

{
  "theme": {
    "themePath": "./src/styles/theme-default",
    "themeVars": "variables.less",
    "outPath": "./src/styles/theme-custom",
    "outName": "theme-custom",
    "browsers": ["ie > 9", "last 2 versions"],
    "minimize": false,
    "components": ["button", "input"]
  }
}

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i theme-zero

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

10.1 kB

Total Files

8

Last publish

Collaborators

  • loubaojian