Modify the directory structure
Modify the directory structure
This commit is contained in:
parent
31fbef10e4
commit
4b05d84ea2
175 changed files with 48 additions and 46 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -15,6 +15,4 @@ npm-debug.log
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
*.log
|
*.log
|
||||||
/index.html
|
test/dist
|
||||||
/index_prod.html
|
|
||||||
local/dist
|
|
|
@ -14,7 +14,7 @@ var concat = require('gulp-concat');
|
||||||
|
|
||||||
// 组件的基础css
|
// 组件的基础css
|
||||||
gulp.task('base', function () {
|
gulp.task('base', function () {
|
||||||
gulp.src('../styles/index.less')
|
gulp.src('../src/styles/index.less')
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
.pipe(rename('iview.css'))
|
.pipe(rename('iview.css'))
|
||||||
|
@ -23,13 +23,13 @@ gulp.task('base', function () {
|
||||||
|
|
||||||
// 字体
|
// 字体
|
||||||
gulp.task('fonts', function () {
|
gulp.task('fonts', function () {
|
||||||
gulp.src('../styles/common/iconfont/fonts/*.*')
|
gulp.src('../src/styles/common/iconfont/fonts/*.*')
|
||||||
.pipe(gulp.dest('../dist/styles/fonts'))
|
.pipe(gulp.dest('../dist/styles/fonts'))
|
||||||
});
|
});
|
||||||
|
|
||||||
// 文章排版
|
// 文章排版
|
||||||
gulp.task('article', function () {
|
gulp.task('article', function () {
|
||||||
gulp.src('../styles/article/index.less')
|
gulp.src('../src/styles/article/index.less')
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
.pipe(rename('article.css'))
|
.pipe(rename('article.css'))
|
||||||
|
@ -38,7 +38,7 @@ gulp.task('article', function () {
|
||||||
|
|
||||||
// 套装的全部css
|
// 套装的全部css
|
||||||
gulp.task('pack-all', function () {
|
gulp.task('pack-all', function () {
|
||||||
gulp.src('../styles/package.less')
|
gulp.src('../src/styles/package.less')
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
.pipe(rename('iview.pack.css'))
|
.pipe(rename('iview.pack.css'))
|
||||||
|
@ -47,7 +47,7 @@ gulp.task('pack-all', function () {
|
||||||
|
|
||||||
// 每个套装的css
|
// 每个套装的css
|
||||||
gulp.task('pack', function () {
|
gulp.task('pack', function () {
|
||||||
gulp.src(['../styles/packages/*.less', '!../styles/packages/index.less'])
|
gulp.src(['../src/styles/packages/*.less', '!../src/styles/packages/index.less'])
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
.pipe(rename({
|
.pipe(rename({
|
||||||
|
@ -58,7 +58,7 @@ gulp.task('pack', function () {
|
||||||
|
|
||||||
// 全部css(包含组件和套装)
|
// 全部css(包含组件和套装)
|
||||||
gulp.task('all', function () {
|
gulp.task('all', function () {
|
||||||
gulp.src(['../styles/index.less', '../styles/package.less'])
|
gulp.src(['../src/styles/index.less', '../src/styles/package.less'])
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(concat('iview.all.css'))
|
.pipe(concat('iview.all.css'))
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
|
|
|
@ -10,13 +10,13 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 入口
|
// 入口
|
||||||
entry: {
|
entry: {
|
||||||
main: './local/main',
|
main: './test/main',
|
||||||
vendors: ['vue', 'vue-router']
|
vendors: ['vue', 'vue-router']
|
||||||
},
|
},
|
||||||
// 输出
|
// 输出
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, '.././local/dist'),
|
path: path.join(__dirname, '.././test/dist'),
|
||||||
publicPath: '/local/dist/',
|
publicPath: '/test/dist/',
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
chunkFilename: '[name].chunk.js'
|
chunkFilename: '[name].chunk.js'
|
||||||
},
|
},
|
||||||
|
@ -38,7 +38,7 @@ module.exports = {
|
||||||
"style-loader",
|
"style-loader",
|
||||||
"css-loader?sourceMap",
|
"css-loader?sourceMap",
|
||||||
{
|
{
|
||||||
publicPath: "../local/dist/"
|
publicPath: "../test/dist/"
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
less: ExtractTextPlugin.extract(
|
less: ExtractTextPlugin.extract(
|
||||||
|
@ -57,15 +57,15 @@ module.exports = {
|
||||||
// require时省略的扩展名,如:require('module') 不需要module.js
|
// require时省略的扩展名,如:require('module') 不需要module.js
|
||||||
extensions: ['', '.js', '.vue'],
|
extensions: ['', '.js', '.vue'],
|
||||||
alias: {
|
alias: {
|
||||||
iview: '../.././index'
|
iview: '../../src/index'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
|
new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
|
||||||
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
|
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
|
||||||
new HtmlWebpackPlugin({ // 构建html文件
|
new HtmlWebpackPlugin({ // 构建html文件
|
||||||
filename: '../../index.html',
|
filename: '../../test/index.html',
|
||||||
template: './local/template/index.html',
|
template: './test/template/index.html',
|
||||||
inject: 'body'
|
inject: 'body'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
1
dist/styles/article.css
vendored
1
dist/styles/article.css
vendored
|
@ -1 +0,0 @@
|
||||||
.ivu-article h1{font-size:28px}.ivu-article h2{font-size:22px}.ivu-article h3{font-size:18px}.ivu-article h4{font-size:14px}.ivu-article h5,.ivu-article h6{font-size:12px}.ivu-article blockquote{padding:5px 5px 3px 10px;line-height:1.5;border-left:4px solid #ddd;margin-bottom:20px;color:#666;font-size:14px}.ivu-article ul{padding-left:40px;list-style-type:disc}.ivu-article li{margin-bottom:5px}.ivu-article ol ul,.ivu-article ul ul{list-style-type:circle}.ivu-article p{margin:5px}
|
|
11
dist/styles/iview.all.css
vendored
11
dist/styles/iview.all.css
vendored
File diff suppressed because one or more lines are too long
6
dist/styles/iview.css
vendored
6
dist/styles/iview.css
vendored
File diff suppressed because one or more lines are too long
6
dist/styles/iview.pack.css
vendored
6
dist/styles/iview.pack.css
vendored
|
@ -1,6 +0,0 @@
|
||||||
/*!
|
|
||||||
* iView
|
|
||||||
* Web: https://www.iviewui.com
|
|
||||||
* Github: https://github.com/iview/iview
|
|
||||||
* Author: Aresn
|
|
||||||
*/.signin{color:red}.signup{color:#f60}
|
|
1
dist/styles/packages/iview.pack.signin.css
vendored
1
dist/styles/packages/iview.pack.signin.css
vendored
|
@ -1 +0,0 @@
|
||||||
.signin{color:red}
|
|
1
dist/styles/packages/iview.pack.signup.css
vendored
1
dist/styles/packages/iview.pack.signup.css
vendored
|
@ -1 +0,0 @@
|
||||||
.signup{color:#f60}
|
|
|
@ -13,10 +13,10 @@
|
||||||
"ui",
|
"ui",
|
||||||
"framework"
|
"framework"
|
||||||
],
|
],
|
||||||
"main": "index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"init": "webpack --progress --config build/webpack.config.js",
|
"init": "webpack --progress --config build/webpack.config.js",
|
||||||
"dev": "webpack-dev-server --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js",
|
"dev": "webpack-dev-server --content-base test --inline --hot --compress --history-api-fallback --port 8081 --config build/webpack.config.js",
|
||||||
"build": "gulp --gulpfile build/build-style.js"
|
"build": "gulp --gulpfile build/build-style.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 326 KiB |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue