Merge remote-tracking branch 'origin/master' into hotfix/waterfall
This commit is contained in:
@@ -10,15 +10,15 @@ let componentPaths = [];
|
||||
delete components.font;
|
||||
|
||||
Object.keys(components).forEach(key => {
|
||||
const filePath = path.join(__dirname, `../../packages/${key}/cooking.conf.js`);
|
||||
const filePath = path.join(__dirname, `../../packages/${key}/webpack.conf.js`);
|
||||
|
||||
if (existsSync(filePath)) {
|
||||
componentPaths.push(`packages/${key}/cooking.conf.js`);
|
||||
componentPaths.push(`packages/${key}/webpack.conf.js`);
|
||||
}
|
||||
});
|
||||
|
||||
const paths = componentPaths.join(',');
|
||||
const cli = `node_modules/.bin/cooking build -c ${paths} -p`;
|
||||
const cli = `node_modules/.bin/webpack build -c ${paths} -p`;
|
||||
|
||||
execSync(cli, {
|
||||
stdio: 'inherit'
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
git checkout master
|
||||
git merge dev
|
||||
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
echo "Enter release version: "
|
||||
read VERSION
|
||||
|
||||
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
echo "Releasing $VERSION ..."
|
||||
|
||||
# build
|
||||
VERSION=$VERSION npm run dist
|
||||
|
||||
# publish zanui-css
|
||||
echo "Releasing zanui-css $VERSION ..."
|
||||
cd packages/zanui-css
|
||||
npm version $VERSION --message "[release] $VERSION"
|
||||
npm publish
|
||||
cd ../..
|
||||
|
||||
# commit
|
||||
git add -A
|
||||
git commit -m "[build] $VERSION"
|
||||
npm version $VERSION --message "[release] $VERSION"
|
||||
|
||||
# publish
|
||||
git push origin master
|
||||
git push origin refs/tags/v$VERSION
|
||||
git checkout dev
|
||||
git rebase master
|
||||
git push origin dev
|
||||
|
||||
npm publish
|
||||
fi
|
||||
+13
-7
@@ -1,13 +1,19 @@
|
||||
var config = require('./webpack.config.js')
|
||||
var config = require('./webpack.config.js');
|
||||
|
||||
config.entry = {
|
||||
'oxygen': './src/index.js'
|
||||
}
|
||||
'zanui': './src/index.js'
|
||||
};
|
||||
|
||||
config.output = {
|
||||
filename: './dist/[name].js',
|
||||
library: 'Oxygen',
|
||||
filename: './lib/[name].js',
|
||||
library: 'zanui',
|
||||
libraryTarget: 'umd'
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = config
|
||||
config.externals = {
|
||||
vue: 'Vue'
|
||||
};
|
||||
|
||||
delete config.devtool;
|
||||
|
||||
module.exports = config;
|
||||
|
||||
Vendored
+11
-10
@@ -1,19 +1,20 @@
|
||||
var config = require('./webpack.build.js')
|
||||
var webpack = require('webpack')
|
||||
var config = require('./webpack.build.js');
|
||||
var webpack = require('webpack');
|
||||
|
||||
|
||||
config.output.filename = config.output.filename.replace(/\.js$/, '.min.js')
|
||||
|
||||
delete config.devtool
|
||||
config.output.filename = config.output.filename.replace(/\.js$/, '.min.js');
|
||||
|
||||
config.plugins = [
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true,
|
||||
debug: false
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: false,
|
||||
drop_console: true,
|
||||
comments: false,
|
||||
compress: {
|
||||
drop_console: true,
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
]
|
||||
];
|
||||
|
||||
module.exports = config
|
||||
module.exports = config;
|
||||
|
||||
@@ -24,7 +24,8 @@ function wrap(render) {
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
'build-docs': './docs/index.js'
|
||||
'zanui-docs': './docs/index.js',
|
||||
'zanui-examples': './docs/examples.js'
|
||||
},
|
||||
output: {
|
||||
path: './docs/build',
|
||||
@@ -39,7 +40,7 @@ module.exports = {
|
||||
extensions: ['.js', '.vue', '.pcss'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.runtime.common.js',
|
||||
'oxygen': path.join(__dirname, '..'),
|
||||
'zanui': path.join(__dirname, '..'),
|
||||
'src': path.join(__dirname, '../src'),
|
||||
'packages': path.join(__dirname, '../packages')
|
||||
}
|
||||
@@ -57,10 +58,6 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: 'style-loader!css-loader?root=./docs/'
|
||||
},
|
||||
{
|
||||
test: /\.pcss$/,
|
||||
loader: 'style-loader!css-loader!postcss-loader'
|
||||
},
|
||||
{
|
||||
@@ -91,8 +88,12 @@ if (process.env.NODE_ENV === 'production') {
|
||||
}),
|
||||
new ExtractTextPlugin(`yzvue_base_${version}_min.css`),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {warnings: false},
|
||||
output: {comments: false},
|
||||
compress: {
|
||||
warnings: false
|
||||
},
|
||||
output: {
|
||||
comments: false
|
||||
},
|
||||
sourceMap: false
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
|
||||
Reference in New Issue
Block a user