mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-02 12:07:39 +08:00
more build tweaks
This commit is contained in:
parent
961d109148
commit
97476a4185
9
.babelrc
9
.babelrc
@ -1,12 +1,5 @@
|
|||||||
{
|
{
|
||||||
"env": {
|
"presets": ["es2015", "flow-vue"],
|
||||||
"development": {
|
|
||||||
"presets": ["es2015", "flow-vue"]
|
|
||||||
},
|
|
||||||
"production": {
|
|
||||||
"presets": ["es2015-rollup-vue", "flow-vue"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"dist/*.js",
|
"dist/*.js",
|
||||||
"packages/**/*.js"
|
"packages/**/*.js"
|
||||||
|
12
build/alias.js
Normal file
12
build/alias.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
vue: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler'),
|
||||||
|
compiler: path.resolve(__dirname, '../src/compiler'),
|
||||||
|
core: path.resolve(__dirname, '../src/core'),
|
||||||
|
shared: path.resolve(__dirname, '../src/shared'),
|
||||||
|
web: path.resolve(__dirname, '../src/platforms/web'),
|
||||||
|
server: path.resolve(__dirname, '../src/server'),
|
||||||
|
entries: path.resolve(__dirname, '../src/entries'),
|
||||||
|
sfc: path.resolve(__dirname, '../src/sfc')
|
||||||
|
}
|
@ -11,7 +11,7 @@ var webpackConfig = {
|
|||||||
loaders: [
|
loaders: [
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'babel!eslint',
|
loader: 'babel',
|
||||||
exclude: /node_modules/
|
exclude: /node_modules/
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
var flowRemoveTypes = require('flow-remove-types')
|
const flowRemoveTypes = require('flow-remove-types')
|
||||||
var createFilter = require('rollup-pluginutils').createFilter
|
const createFilter = require('rollup-pluginutils').createFilter
|
||||||
|
|
||||||
module.exports = function(options) {
|
module.exports = options => {
|
||||||
options = options || {};
|
options = options || {}
|
||||||
var filter = createFilter(options.include, options.exclude)
|
const filter = createFilter(options.include, options.exclude)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: 'flow-remove-types',
|
name: 'flow-remove-types',
|
||||||
transform: function(code, id) {
|
transform: (code, id) => {
|
||||||
if (filter(id)) {
|
if (filter(id)) {
|
||||||
return flowRemoveTypes(code)
|
return flowRemoveTypes(code)
|
||||||
}
|
}
|
||||||
|
11
package.json
11
package.json
@ -17,14 +17,14 @@
|
|||||||
"build": "node build/build.js",
|
"build": "node build/build.js",
|
||||||
"build:ssr": "npm run build -- vue.common.js,vue-server-renderer",
|
"build:ssr": "npm run build -- vue.common.js,vue-server-renderer",
|
||||||
"test": "npm run lint && flow check && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr",
|
"test": "npm run lint && flow check && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr",
|
||||||
"test:unit": "NODE_ENV=development karma start build/karma.unit.config.js",
|
"test:unit": "karma start build/karma.unit.config.js",
|
||||||
"test:cover": "NODE_ENV=development karma start build/karma.cover.config.js",
|
"test:cover": "karma start build/karma.cover.config.js",
|
||||||
"test:e2e": "npm run build -- vue.js && node test/e2e/runner.js",
|
"test:e2e": "npm run build -- vue.js && node test/e2e/runner.js",
|
||||||
"test:ssr": "npm run build:ssr && NODE_ENV=development VUE_ENV=server jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
|
"test:ssr": "npm run build:ssr && VUE_ENV=server jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
|
||||||
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
|
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
|
||||||
"lint": "eslint src build test",
|
"lint": "eslint src build test",
|
||||||
"flow": "flow check",
|
"flow": "flow check",
|
||||||
"sauce": "NODE_ENV=development SAUCE=true karma start build/karma.sauce.config.js",
|
"sauce": "SAUCE=true karma start build/karma.sauce.config.js",
|
||||||
"bench:ssr": "npm run build:ssr && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToString.js && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToStream.js",
|
"bench:ssr": "npm run build:ssr && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToString.js && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToStream.js",
|
||||||
"release": "bash build/release.sh"
|
"release": "bash build/release.sh"
|
||||||
},
|
},
|
||||||
@ -47,7 +47,6 @@
|
|||||||
"babel-loader": "^6.2.4",
|
"babel-loader": "^6.2.4",
|
||||||
"babel-plugin-coverage": "^1.0.0",
|
"babel-plugin-coverage": "^1.0.0",
|
||||||
"babel-preset-es2015": "^6.9.0",
|
"babel-preset-es2015": "^6.9.0",
|
||||||
"babel-preset-es2015-rollup-vue": "^1.1.0",
|
|
||||||
"babel-preset-flow-vue": "^1.0.0",
|
"babel-preset-flow-vue": "^1.0.0",
|
||||||
"buble": "^0.13.1",
|
"buble": "^0.13.1",
|
||||||
"chromedriver": "^2.21.2",
|
"chromedriver": "^2.21.2",
|
||||||
@ -87,6 +86,6 @@
|
|||||||
"rollup-watch": "^2.5.0",
|
"rollup-watch": "^2.5.0",
|
||||||
"selenium-server": "2.53.0",
|
"selenium-server": "2.53.0",
|
||||||
"uglify-js": "^2.6.2",
|
"uglify-js": "^2.6.2",
|
||||||
"webpack": "^1.13.1"
|
"webpack": "^1.13.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user