From 9a4ac1406622abed2c3ba5f2490acb33eb2f7fb1 Mon Sep 17 00:00:00 2001 From: niunai Date: Mon, 20 Feb 2017 01:10:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5vue-jsx=EF=BC=8C=20=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 2 +- build/utils/postcss_pipe.js | 4 +- build/webpack.config.js | 2 +- docs/examples/button.md | 90 +++++++++++++------ package.json | 5 +- packages/button/src/{button.vue => button.js} | 59 ++++++------ packages/zanui-css/src/button.pcss | 51 +++++++---- packages/zanui-css/src/button_group.pcss | 29 ++++++ packages/zanui-css/src/common/var.pcss | 4 + packages/zanui-css/src/index.pcss | 1 + 10 files changed, 170 insertions(+), 77 deletions(-) rename packages/button/src/{button.vue => button.js} (58%) create mode 100644 packages/zanui-css/src/button_group.pcss diff --git a/.eslintignore b/.eslintignore index 72bf17083..6e89e4d38 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,4 @@ lib/ dist/ node_modules/ -build/ +build/**/*.js diff --git a/build/utils/postcss_pipe.js b/build/utils/postcss_pipe.js index 737ac415c..6c5fafd1b 100644 --- a/build/utils/postcss_pipe.js +++ b/build/utils/postcss_pipe.js @@ -4,8 +4,8 @@ var config = { "bem": { - "shortcuts": {"component": "c", "modifier": "m", "descendent": "d"}, - "separators": {"descendent": "-", "modifier": "--"} + "shortcuts": {"component": "b", "modifier": "m", "descendent": "e"}, + "separators": {"descendent": "__", "modifier": "--"} }/*, "autoprefixer": {"browsers": ["ie > 8", "last 2 versions"]}, "rem": {"browsers": ["ie > 8", "last 2 versions"]}*/ diff --git a/build/webpack.config.js b/build/webpack.config.js index b5d758f6a..5d28befbf 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -109,7 +109,7 @@ if (process.env.NODE_ENV === 'production') { postcss: getPoastcssPlugin, babel: { presets: ['es2015'], - plugins: ['transform-runtime'] + plugins: ['transform-runtime', 'transform-vue-jsx'] }, eslint: { formatter: require('eslint-friendly-formatter') diff --git a/docs/examples/button.md b/docs/examples/button.md index 44011e77a..e7d0e761c 100644 --- a/docs/examples/button.md +++ b/docs/examples/button.md @@ -1,14 +1,8 @@