fix(build): replace NODE_ENV with MAND_ENV in some components
This commit is contained in:
parent
7edcab6ecd
commit
e431e5aa32
|
@ -145,7 +145,7 @@ export default {
|
||||||
// popup box enter the animation after popup show
|
// popup box enter the animation after popup show
|
||||||
this.isPopupBoxShow = true
|
this.isPopupBoxShow = true
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (process.env.NODE_ENV === 'test') {
|
if (process.env.MAND_ENV === 'test') {
|
||||||
this.$_onPopupTransitionStart()
|
this.$_onPopupTransitionStart()
|
||||||
this.$_onPopupTransitionEnd()
|
this.$_onPopupTransitionEnd()
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
||||||
this.preventScroll && this.$_preventScroll(false)
|
this.preventScroll && this.$_preventScroll(false)
|
||||||
this.$emit('input', false)
|
this.$emit('input', false)
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (process.env.NODE_ENV === 'test') {
|
if (process.env.MAND_ENV === 'test') {
|
||||||
this.$_onPopupTransitionStart()
|
this.$_onPopupTransitionStart()
|
||||||
this.$_onPopupTransitionEnd()
|
this.$_onPopupTransitionEnd()
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,8 +547,8 @@ export default {
|
||||||
dragState.startTime = new Date()
|
dragState.startTime = new Date()
|
||||||
dragState.startLeft = point.pageX
|
dragState.startLeft = point.pageX
|
||||||
dragState.startTop = point.pageY
|
dragState.startTop = point.pageY
|
||||||
dragState.itemWidth = process.env.NODE_ENV !== 'test' ? element.offsetWidth : 100
|
dragState.itemWidth = process.env.MAND_ENV !== 'test' ? element.offsetWidth : 100
|
||||||
dragState.itemHeight = process.env.NODE_ENV !== 'test' ? element.offsetHeight : 100
|
dragState.itemHeight = process.env.MAND_ENV !== 'test' ? element.offsetHeight : 100
|
||||||
},
|
},
|
||||||
|
|
||||||
$_doOnTouchMove(event) {
|
$_doOnTouchMove(event) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
repetition: process.env.NODE_ENV === 'test' ? 2 : 50,
|
repetition: process.env.MAND_ENV === 'test' ? 2 : 50,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,6 @@ const merge = require('webpack-merge')
|
||||||
const prodEnv = require('./prod.env')
|
const prodEnv = require('./prod.env')
|
||||||
|
|
||||||
module.exports = merge(prodEnv, {
|
module.exports = merge(prodEnv, {
|
||||||
NODE_ENV: '"development"'
|
NODE_ENV: '"development"',
|
||||||
|
MAND_ENV: '"development"',
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"production"'
|
NODE_ENV: '"production"',
|
||||||
|
MAND_ENV: '"production"',
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,6 @@ const merge = require('webpack-merge')
|
||||||
const devEnv = require('./dev.env')
|
const devEnv = require('./dev.env')
|
||||||
|
|
||||||
module.exports = merge(devEnv, {
|
module.exports = merge(devEnv, {
|
||||||
NODE_ENV: '"testing"'
|
NODE_ENV: '"testing"',
|
||||||
|
MAND_ENV: '"testing"',
|
||||||
})
|
})
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
"build:webpack:mand-mobile": "cross-env NODE_ENV=production node build/webpack/build-mand-mobile",
|
"build:webpack:mand-mobile": "cross-env NODE_ENV=production node build/webpack/build-mand-mobile",
|
||||||
"build:webpack:components": "cross-env NODE_ENV=production gulp build --gulpfile gulpfile.js && node build/webpack/build-style-entry",
|
"build:webpack:components": "cross-env NODE_ENV=production gulp build --gulpfile gulpfile.js && node build/webpack/build-style-entry",
|
||||||
"codecov": "codecov",
|
"codecov": "codecov",
|
||||||
"test": "jest --no-cache --runInBand --verbose --silent",
|
"test": "MAND_ENV=test jest --no-cache --runInBand --verbose --silent",
|
||||||
"test:lib": "TEST_TYPE=lib jest --no-cache --runInBand --verbose --silent",
|
"test:lib": "MAND_ENV=test TEST_TYPE=lib jest --no-cache --runInBand --verbose --silent",
|
||||||
"test:lib-vw": "TEST_TYPE=lib-vw jest --no-cache --runInBand --verbose --silent"
|
"test:lib-vw": "MAND_ENV=test TEST_TYPE=lib-vw jest --no-cache --runInBand --verbose --silent"
|
||||||
},
|
},
|
||||||
"license": "Apache",
|
"license": "Apache",
|
||||||
"config": {
|
"config": {
|
||||||
|
|
Loading…
Reference in New Issue