From f524d6ccd2b73f4c4a3281f37d4585971b094ffe Mon Sep 17 00:00:00 2001 From: cookfront Date: Fri, 24 Feb 2017 17:46:56 +0800 Subject: [PATCH] zanui css build --- .gitignore | 1 + build/bin/build-entry.js | 2 -- build/webpack.build.js | 2 +- build/webpack.config.js | 4 ---- docs/App.vue | 2 ++ docs/index.js | 3 ++- package.json | 5 +++-- packages/dialog/src/dialog.vue | 2 +- packages/zanui-css/README.md | 1 + packages/zanui-css/gulpfile.js | 13 +++++++++++ packages/zanui-css/package.json | 22 ++++++++++++++----- packages/zanui-css/salad.config.json | 16 ++++++++++++++ .../zanui-css/src/{button.pcss => button.css} | 0 .../{button_group.pcss => button_group.css} | 0 .../zanui-css/src/{cell.pcss => cell.css} | 0 .../zanui-css/src/{dialog.pcss => dialog.css} | 0 .../zanui-css/src/{field.pcss => field.css} | 0 .../zanui-css/src/{icon.pcss => icon.css} | 0 packages/zanui-css/src/index.css | 14 ++++++++++++ packages/zanui-css/src/index.pcss | 12 ---------- .../src/{loading.pcss => loading.css} | 0 .../zanui-css/src/{picker.pcss => picker.css} | 0 .../zanui-css/src/{popup.pcss => popup.css} | 0 .../zanui-css/src/{radio.pcss => radio.css} | 0 .../zanui-css/src/{switch.pcss => switch.css} | 0 src/index.js | 2 -- 26 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 packages/zanui-css/gulpfile.js create mode 100644 packages/zanui-css/salad.config.json rename packages/zanui-css/src/{button.pcss => button.css} (100%) rename packages/zanui-css/src/{button_group.pcss => button_group.css} (100%) rename packages/zanui-css/src/{cell.pcss => cell.css} (100%) rename packages/zanui-css/src/{dialog.pcss => dialog.css} (100%) rename packages/zanui-css/src/{field.pcss => field.css} (100%) rename packages/zanui-css/src/{icon.pcss => icon.css} (100%) create mode 100644 packages/zanui-css/src/index.css delete mode 100644 packages/zanui-css/src/index.pcss rename packages/zanui-css/src/{loading.pcss => loading.css} (100%) rename packages/zanui-css/src/{picker.pcss => picker.css} (100%) rename packages/zanui-css/src/{popup.pcss => popup.css} (100%) rename packages/zanui-css/src/{radio.pcss => radio.css} (100%) rename packages/zanui-css/src/{switch.pcss => switch.css} (100%) diff --git a/.gitignore b/.gitignore index 5306c013b..4c1cab8de 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ lib/* !lib/style.css node_modules example/dist +dist diff --git a/build/bin/build-entry.js b/build/bin/build-entry.js index d343a9195..d43620767 100644 --- a/build/bin/build-entry.js +++ b/build/bin/build-entry.js @@ -8,8 +8,6 @@ var OUTPUT_PATH = path.join(__dirname, '../../src/index.js'); var IMPORT_TEMPLATE = 'import {{name}} from \'../packages/{{package}}/index.js\';'; var ISNTALL_COMPONENT_TEMPLATE = ' Vue.component({{name}}.name, {{name}});'; var MAIN_TEMPLATE = `{{include}} -// zanui -import '../packages/zanui-css/src/index.pcss'; const install = function(Vue) { if (install.installed) return; diff --git a/build/webpack.build.js b/build/webpack.build.js index 4222eae61..6e900f7ba 100644 --- a/build/webpack.build.js +++ b/build/webpack.build.js @@ -6,7 +6,7 @@ config.entry = { config.output = { filename: './dist/[name].js', - library: 'Oxygen', + library: 'zanui', libraryTarget: 'umd' } diff --git a/build/webpack.config.js b/build/webpack.config.js index 5d28befbf..8841731d8 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -57,10 +57,6 @@ module.exports = { }, { test: /\.css$/, - loader: 'style-loader!css-loader?root=./docs/' - }, - { - test: /\.pcss$/, loader: 'style-loader!css-loader!postcss-loader' }, { diff --git a/docs/App.vue b/docs/App.vue index c0b8380c3..648a9b356 100644 --- a/docs/App.vue +++ b/docs/App.vue @@ -21,6 +21,8 @@ export default {