empty master
This commit is contained in:
parent
92c1162255
commit
67d534df27
276 changed files with 0 additions and 28368 deletions
|
@ -1,25 +0,0 @@
|
|||
var gulp = require('gulp');
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
var less = require('gulp-less');
|
||||
var rename = require('gulp-rename');
|
||||
var autoprefixer = require('gulp-autoprefixer');
|
||||
|
||||
// 编译less
|
||||
gulp.task('css', function () {
|
||||
gulp.src('../src/styles/index.less')
|
||||
.pipe(less())
|
||||
.pipe(autoprefixer({
|
||||
browsers: ['last 2 versions', 'ie > 8']
|
||||
}))
|
||||
.pipe(cleanCSS())
|
||||
.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('default', ['css', 'fonts']);
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* 本地预览
|
||||
*/
|
||||
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
// 入口
|
||||
entry: {
|
||||
main: './test/main',
|
||||
vendors: ['vue', 'vue-router']
|
||||
},
|
||||
// 输出
|
||||
output: {
|
||||
path: path.join(__dirname, '../test/dist'),
|
||||
publicPath: '/test/dist/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].chunk.js'
|
||||
},
|
||||
// 加载器
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.vue$/, loader: 'vue' },
|
||||
{ test: /\.js$/, loader: 'babel', exclude: /node_modules/ },
|
||||
{ test: /\.css$/, loader: 'style!css!autoprefixer'},
|
||||
{ test: /\.less$/, loader: 'style!css!less' },
|
||||
{ test: /\.scss$/, loader: 'style!css!sass?sourceMap'},
|
||||
{ test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/, loader: 'url-loader?limit=8192'},
|
||||
{ test: /\.(html|tpl)$/, loader: 'html-loader' }
|
||||
]
|
||||
},
|
||||
vue: {
|
||||
loaders: {
|
||||
css: ExtractTextPlugin.extract(
|
||||
"style-loader",
|
||||
"css-loader?sourceMap",
|
||||
{
|
||||
publicPath: "/test/dist/"
|
||||
}
|
||||
),
|
||||
less: ExtractTextPlugin.extract(
|
||||
'vue-style-loader',
|
||||
'css-loader!less-loader'
|
||||
),
|
||||
js: 'babel'
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
// require时省略的扩展名,如:require('module') 不需要module.js
|
||||
extensions: ['', '.js', '.vue'],
|
||||
alias: {
|
||||
iview: '../../src/index'
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
|
||||
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
|
||||
]
|
||||
};
|
|
@ -1,56 +0,0 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: './src/index.js'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
publicPath: '/dist/',
|
||||
filename: 'iview.js',
|
||||
library: 'iview',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true
|
||||
},
|
||||
externals: {
|
||||
vue: {
|
||||
root: 'Vue',
|
||||
commonjs: 'vue',
|
||||
commonjs2: 'vue',
|
||||
amd: 'vue'
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.vue']
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue'
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
loader: 'babel',
|
||||
exclude: /node_modules/
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: 'style!css!autoprefixer'
|
||||
}, {
|
||||
test: /\.less$/,
|
||||
loader: 'style!css!less'
|
||||
}, {
|
||||
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
|
||||
loader: 'url?limit=8192'
|
||||
}, {
|
||||
test: /\.(html|tpl)$/,
|
||||
loader: 'vue-html'
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"development"'
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: './src/index.js'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
publicPath: '/dist/',
|
||||
filename: 'iview.min.js',
|
||||
library: 'iview',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true
|
||||
},
|
||||
externals: {
|
||||
vue: {
|
||||
root: 'Vue',
|
||||
commonjs: 'vue',
|
||||
commonjs2: 'vue',
|
||||
amd: 'vue'
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.vue']
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue'
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
loader: 'babel',
|
||||
exclude: /node_modules/
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: 'style!css!autoprefixer'
|
||||
}, {
|
||||
test: /\.less$/,
|
||||
loader: 'style!css!less'
|
||||
}, {
|
||||
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
|
||||
loader: 'url?limit=8192'
|
||||
}, {
|
||||
test: /\.(html|tpl)$/,
|
||||
loader: 'vue-html'
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.OccurenceOrderPlugin()
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue