Browse Source

remove env vars from npm scripts

dev
Evan You 8 years ago
parent
commit
dd35cbf69a
  1. 2
      benchmarks/ssr/renderToStream.js
  2. 2
      benchmarks/ssr/renderToString.js
  3. 4
      build/karma.base.config.js
  4. 13
      build/karma.sauce.config.js
  5. 16
      package.json

2
benchmarks/ssr/renderToStream.js

@ -2,6 +2,8 @@
'use strict'
process.env.NODE_ENV = 'production'
const Vue = require('../../dist/vue.runtime.common.js')
const createRenderer = require('../../packages/vue-server-renderer').createRenderer
const renderToStream = createRenderer().renderToStream

2
benchmarks/ssr/renderToString.js

@ -1,5 +1,7 @@
'use strict'
process.env.NODE_ENV = 'production'
const Vue = require('../../dist/vue.runtime.common.js')
const createRenderer = require('../../packages/vue-server-renderer').createRenderer
const renderToString = createRenderer().renderToString

4
build/karma.base.config.js

@ -19,8 +19,8 @@ var webpackConfig = {
__WEEX__: false,
'process.env': {
NODE_ENV: '"development"',
TRANSITION_DURATION: process.env.SAUCE ? 500 : 50,
TRANSITION_BUFFER: process.env.SAUCE ? 50 : 10
TRANSITION_DURATION: 50,
TRANSITION_BUFFER: 10
}
})
],

13
build/karma.sauce.config.js

@ -1,5 +1,18 @@
var webpack = require('webpack')
var base = require('./karma.base.config.js')
base.webpack.plugins = [
new webpack.DefinePlugin({
__WEEX__: false,
'process.env': {
NODE_ENV: '"development"',
// sauce lab vms are slow!
TRANSITION_DURATION: 500,
TRANSITION_BUFFER: 50
}
})
]
/**
* Having too many tests running concurrently on saucelabs
* causes timeouts and errors, so we have to run them in

16
package.json

@ -12,13 +12,13 @@
"types/*.d.ts"
],
"scripts": {
"dev": "TARGET=web-full-dev rollup -w -c build/config.js",
"dev:cjs": "TARGET=web-runtime-cjs rollup -w -c build/config.js",
"dev": "rollup -w -c build/config.js --environment TARGET:web-full-dev",
"dev:cjs": "rollup -w -c build/config.js --environment TARGET:web-runtime-cjs",
"dev:test": "karma start build/karma.dev.config.js",
"dev:ssr": "TARGET=web-server-renderer rollup -w -c build/config.js",
"dev:compiler": "TARGET=web-compiler rollup -w -c build/config.js",
"dev:weex": "TARGET=weex-framework rollup -w -c build/config.js",
"dev:weex:compiler": "TARGET=weex-compiler rollup -w -c build/config.js",
"dev:ssr": "rollup -w -c build/config.js --environment TARGET:web-server-renderer",
"dev:compiler": "rollup -w -c build/config.js --environment TARGET:web-compiler ",
"dev:weex": "rollup -w -c build/config.js --environment TARGET:weex-framework ",
"dev:weex:compiler": "rollup -w -c build/config.js --environment TARGET:weex-compiler ",
"build": "node build/build.js",
"build:ssr": "npm run build -- vue.runtime.common.js,vue-server-renderer",
"build:weex": "npm run build -- weex-vue-framework,weex-template-compiler",
@ -32,8 +32,8 @@
"test:types": "tsc -p ./types/test/tsconfig.json",
"lint": "eslint src build test",
"flow": "flow check",
"sauce": "SAUCE=true karma start build/karma.sauce.config.js",
"bench:ssr": "npm run build:ssr && NODE_ENV=production node benchmarks/ssr/renderToString.js && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToStream.js",
"sauce": "karma start build/karma.sauce.config.js",
"bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
"release": "bash build/release.sh",
"release:weex": "bash build/release-weex.sh",
"install:hooks": "ln -fs ../../build/git-hooks/pre-commit .git/hooks/pre-commit"

Loading…
Cancel
Save