Modify the directory structure

Modify the directory structure
This commit is contained in:
梁灏 2016-10-28 10:09:07 +08:00
parent 31fbef10e4
commit 4b05d84ea2
175 changed files with 48 additions and 46 deletions

4
.gitignore vendored
View file

@ -15,6 +15,4 @@ npm-debug.log
*.swp
*.swo
*.log
/index.html
/index_prod.html
local/dist
test/dist

View file

@ -14,7 +14,7 @@ var concat = require('gulp-concat');
// 组件的基础css
gulp.task('base', function () {
gulp.src('../styles/index.less')
gulp.src('../src/styles/index.less')
.pipe(less())
.pipe(minifyCSS())
.pipe(rename('iview.css'))
@ -23,13 +23,13 @@ gulp.task('base', function () {
// 字体
gulp.task('fonts', function () {
gulp.src('../styles/common/iconfont/fonts/*.*')
gulp.src('../src/styles/common/iconfont/fonts/*.*')
.pipe(gulp.dest('../dist/styles/fonts'))
});
// 文章排版
gulp.task('article', function () {
gulp.src('../styles/article/index.less')
gulp.src('../src/styles/article/index.less')
.pipe(less())
.pipe(minifyCSS())
.pipe(rename('article.css'))
@ -38,7 +38,7 @@ gulp.task('article', function () {
// 套装的全部css
gulp.task('pack-all', function () {
gulp.src('../styles/package.less')
gulp.src('../src/styles/package.less')
.pipe(less())
.pipe(minifyCSS())
.pipe(rename('iview.pack.css'))
@ -47,7 +47,7 @@ gulp.task('pack-all', function () {
// 每个套装的css
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(minifyCSS())
.pipe(rename({
@ -58,7 +58,7 @@ gulp.task('pack', function () {
// 全部css(包含组件和套装)
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(concat('iview.all.css'))
.pipe(minifyCSS())

View file

@ -10,13 +10,13 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
// 入口
entry: {
main: './local/main',
main: './test/main',
vendors: ['vue', 'vue-router']
},
// 输出
output: {
path: path.join(__dirname, '.././local/dist'),
publicPath: '/local/dist/',
path: path.join(__dirname, '.././test/dist'),
publicPath: '/test/dist/',
filename: '[name].js',
chunkFilename: '[name].chunk.js'
},
@ -38,7 +38,7 @@ module.exports = {
"style-loader",
"css-loader?sourceMap",
{
publicPath: "../local/dist/"
publicPath: "../test/dist/"
}
),
less: ExtractTextPlugin.extract(
@ -57,15 +57,15 @@ module.exports = {
// require时省略的扩展名require('module') 不需要module.js
extensions: ['', '.js', '.vue'],
alias: {
iview: '../.././index'
iview: '../../src/index'
}
},
plugins: [
new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
new HtmlWebpackPlugin({ // 构建html文件
filename: '../../index.html',
template: './local/template/index.html',
filename: '../../test/index.html',
template: './test/template/index.html',
inject: 'body'
})
]

View file

@ -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}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +0,0 @@
/*!
* iView
* Web: https://www.iviewui.com
* Github: https://github.com/iview/iview
* Author: Aresn
*/.signin{color:red}.signup{color:#f60}

View file

@ -1 +0,0 @@
.signin{color:red}

View file

@ -1 +0,0 @@
.signup{color:#f60}

View file

@ -13,10 +13,10 @@
"ui",
"framework"
],
"main": "index.js",
"main": "src/index.js",
"scripts": {
"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"
},
"repository": {

View file

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