From bd975b1747d1e8a7c2a8d981e28ab5b6f6202222 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Fri, 25 Nov 2016 18:26:34 +0800 Subject: [PATCH] Doc: update custom theme --- examples/docs/en-US/custom-theme.md | 8 ++++---- examples/docs/zh-CN/custom-theme.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/docs/en-US/custom-theme.md b/examples/docs/en-US/custom-theme.md index 19df6cf52..a5f49959d 100644 --- a/examples/docs/en-US/custom-theme.md +++ b/examples/docs/en-US/custom-theme.md @@ -1,10 +1,10 @@ ## Custom theme -Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea, and this is where our theme customization tool kicks in. +Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea, and this is where our theme customization tool kicks in. ### Install related tool First install the theme generator globally or locally. Local install is recommended because in this way, when others clone your project, npm will automatically install it for them. ```shell -npm i element-theme -D +npm i element-theme -g ``` Then install the default theme from npm or GitHub. @@ -20,7 +20,7 @@ npm i https://github.com/ElementUI/theme-default -D After successfully installing the above packages, a command named `et` is available in CLI (if the packages are installed locally, use `node_modules/.bin/et` instead). Run `-i` to initialize the variable file which outputs to `element-variables.css` by default. And you can specify its output directory as you will. ```shell -node_modules/.bin/et -i [custom output directory] +et -i [custom output directory] > ✔ Generator variables file ``` @@ -53,7 +53,7 @@ Just edit `element-variables.css`, e.g. changing the theme color to red: ### Build theme After saving the variable file, use `et` to build your theme. You can activate `watch` mode by adding a parameter `-w`: ```shell -node_modules/.bin/et +et > ✔ build theme font > ✔ build element theme diff --git a/examples/docs/zh-CN/custom-theme.md b/examples/docs/zh-CN/custom-theme.md index 86f3d6ac1..25ec42a20 100644 --- a/examples/docs/zh-CN/custom-theme.md +++ b/examples/docs/zh-CN/custom-theme.md @@ -2,9 +2,9 @@ Element 默认提供一套主题,CSS 命名采用 BEM 的风格方便使用者覆盖样式。如果你想完全替换主题色或者部分样式,可以使用下面方法。 ### 安装工具 -首先安装「主题生成工具」,可以全局安装或者安装在当前项目下,推荐安装在项目里,方便别人 clone 项目时能直接安装依赖并启动。 +首先安装「主题生成工具」,可以全局安装或者安装在当前项目下,推荐安装在项目里,方便别人 clone 项目时能直接安装依赖并启动,这里以全局安装做演示。 ```shell -npm i element-theme -D +npm i element-theme -g ``` 安装默认主题,可以从 npm 安装或者从 GitHub 拉取最新代码。 @@ -20,7 +20,7 @@ npm i https://github.com/ElementUI/theme-default -D 主题生成工具安装成功后,如果全局安装可以在命令行里通过 `et` 调用工具,如果安装在当前目录下,需要通过 `node_modules/.bin/et` 访问到命令。执行 `-i` 初始化变量文件。默认输出到 `element-variables.css`,当然你可以传参数指定文件输出目录。 ```shell -node_modules/.bin/et -i [可以自定义变量文件目录] +et -i [可以自定义变量文件目录] > ✔ Generator variables file ``` @@ -53,7 +53,7 @@ node_modules/.bin/et -i [可以自定义变量文件目录] ### 编译主题 保存文件后,到命令行里执行 `et` 编译主题,如果你想启用 `watch` 模式,实时编译主题,增加 `-w` 参数。 ```shell -node_modules/.bin/et +et > ✔ build theme font > ✔ build element theme