diff --git a/build/build-style.js b/build/build-style.js
index 9dd9f2a..0e4f255 100644
--- a/build/build-style.js
+++ b/build/build-style.js
@@ -1,68 +1,25 @@
-/**
- * 编译样式文件
- * iview.css 是基础组件css
- * iview.pack.css 是套装的全部css
- * iview.all.css 是基础组件加套装的全部css
- * packages/*.css 是某个套装的css
- * article.css 是文章排版的css
- * */
var gulp = require('gulp');
var minifyCSS = require('gulp-minify-css');
var less = require('gulp-less');
var rename = require('gulp-rename');
-var concat = require('gulp-concat');
+var autoprefixer = require('gulp-autoprefixer');
-// 组件的基础css
-gulp.task('base', function () {
+// 编译less
+gulp.task('css', function () {
gulp.src('../src/styles/index.less')
.pipe(less())
+ .pipe(autoprefixer({
+ browsers: ['last 2 versions']
+ }))
.pipe(minifyCSS())
.pipe(rename('iview.css'))
.pipe(gulp.dest('../dist/styles'))
});
-// 字体
+// 拷贝字体文件
gulp.task('fonts', function () {
gulp.src('../src/styles/common/iconfont/fonts/*.*')
.pipe(gulp.dest('../dist/styles/fonts'))
});
-// 文章排版
-gulp.task('article', function () {
- gulp.src('../src/styles/article/index.less')
- .pipe(less())
- .pipe(minifyCSS())
- .pipe(rename('article.css'))
- .pipe(gulp.dest('../dist/styles'))
-});
-
-// 套装的全部css
-gulp.task('pack-all', function () {
- gulp.src('../src/styles/package.less')
- .pipe(less())
- .pipe(minifyCSS())
- .pipe(rename('iview.pack.css'))
- .pipe(gulp.dest('../dist/styles'))
-});
-
-// 每个套装的css
-gulp.task('pack', function () {
- gulp.src(['../src/styles/packages/*.less', '!../src/styles/packages/index.less'])
- .pipe(less())
- .pipe(minifyCSS())
- .pipe(rename({
- prefix: 'iview.pack.'
- }))
- .pipe(gulp.dest('../dist/styles/packages'))
-});
-
-// 全部css(包含组件和套装)
-gulp.task('all', function () {
- gulp.src(['../src/styles/index.less', '../src/styles/package.less'])
- .pipe(less())
- .pipe(concat('iview.all.css'))
- .pipe(minifyCSS())
- .pipe(gulp.dest('../dist/styles'))
-});
-
-gulp.task('default', ['base', 'fonts', 'article', 'pack-all', 'pack', 'all']);
\ No newline at end of file
+gulp.task('default', ['css', 'fonts']);
diff --git a/package.json b/package.json
index e9a42ac..06779ff 100644
--- a/package.json
+++ b/package.json
@@ -56,7 +56,7 @@
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"gulp": "^3.9.1",
- "gulp-concat": "^2.6.0",
+ "gulp-autoprefixer": "^3.1.1",
"gulp-less": "^3.1.0",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.2",
diff --git a/src/styles/README.md b/src/styles/README.md
index d840ef7..63ae858 100644
--- a/src/styles/README.md
+++ b/src/styles/README.md
@@ -2,10 +2,12 @@
## 目录
-|-- components (组件样式)
+|-- animation (动画)
|-- common (全局样式)
-|-- packages (套装)
+|-- components (组件样式)
+
+|-- mixins (混入)
-|-- themes (皮肤)
\ No newline at end of file
+|-- themes (主题)
diff --git a/src/styles/article/index.less b/src/styles/article/index.less
deleted file mode 100644
index 8522b3b..0000000
--- a/src/styles/article/index.less
+++ /dev/null
@@ -1,59 +0,0 @@
-.ivu-article {
- h1{
- font-size: 26px;
- font-weight: normal;
- }
- h2{
- font-size: 20px;
- font-weight: normal;
- }
- h3{
- font-size: 16px;
- font-weight: normal;
- }
- h4{
- font-size: 14px;
- font-weight: normal;
- }
- h5{
- font-size: 12px;
- font-weight: normal;
- }
- h6{
- font-size: 12px;
- font-weight: normal;
- }
-
- blockquote{
- padding: 5px 5px 3px 10px;
- line-height: 1.5;
- border-left: 4px solid #ddd;
- margin-bottom: 20px;
- color: #666;
- font-size: 14px;
- }
-
- ul{
- padding-left: 40px;
- list-style-type: disc;
- }
- li{
- margin-bottom: 5px;
- font-size: 14px;
- }
- ul ul, ol ul{
- list-style-type: circle;
- }
-
- p{
- margin: 5px;
- font-size: 14px;
- }
-
- a[target="_blank"]:after{
- content: "\F220";
- font-family: Ionicons;
- color: #aaa;
- margin-left: 3px;
- }
-}
\ No newline at end of file
diff --git a/src/styles/common/article.less b/src/styles/common/article.less
new file mode 100644
index 0000000..8522b3b
--- /dev/null
+++ b/src/styles/common/article.less
@@ -0,0 +1,59 @@
+.ivu-article {
+ h1{
+ font-size: 26px;
+ font-weight: normal;
+ }
+ h2{
+ font-size: 20px;
+ font-weight: normal;
+ }
+ h3{
+ font-size: 16px;
+ font-weight: normal;
+ }
+ h4{
+ font-size: 14px;
+ font-weight: normal;
+ }
+ h5{
+ font-size: 12px;
+ font-weight: normal;
+ }
+ h6{
+ font-size: 12px;
+ font-weight: normal;
+ }
+
+ blockquote{
+ padding: 5px 5px 3px 10px;
+ line-height: 1.5;
+ border-left: 4px solid #ddd;
+ margin-bottom: 20px;
+ color: #666;
+ font-size: 14px;
+ }
+
+ ul{
+ padding-left: 40px;
+ list-style-type: disc;
+ }
+ li{
+ margin-bottom: 5px;
+ font-size: 14px;
+ }
+ ul ul, ol ul{
+ list-style-type: circle;
+ }
+
+ p{
+ margin: 5px;
+ font-size: 14px;
+ }
+
+ a[target="_blank"]:after{
+ content: "\F220";
+ font-family: Ionicons;
+ color: #aaa;
+ margin-left: 3px;
+ }
+}
\ No newline at end of file
diff --git a/src/styles/package.less b/src/styles/package.less
deleted file mode 100644
index 8b7b947..0000000
--- a/src/styles/package.less
+++ /dev/null
@@ -1,2 +0,0 @@
-@import "./themes/default/index";
-@import "./packages/index";
\ No newline at end of file
diff --git a/src/styles/packages/index.less b/src/styles/packages/index.less
deleted file mode 100644
index bc746be..0000000
--- a/src/styles/packages/index.less
+++ /dev/null
@@ -1,2 +0,0 @@
-@import "signin";
-@import "signup";
\ No newline at end of file
diff --git a/src/styles/packages/signin.less b/src/styles/packages/signin.less
deleted file mode 100644
index 8d5c6d2..0000000
--- a/src/styles/packages/signin.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.signin{
- color: #f00;
-}
\ No newline at end of file
diff --git a/src/styles/packages/signup.less b/src/styles/packages/signup.less
deleted file mode 100644
index 538f607..0000000
--- a/src/styles/packages/signup.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.signup{
- color: #f60;
-}
\ No newline at end of file
diff --git a/test/app.vue b/test/app.vue
index 5e5f2e5..c3ad35b 100644
--- a/test/app.vue
+++ b/test/app.vue
@@ -1,7 +1,5 @@