Use replace to set production
This commit is contained in:
parent
e5239d952e
commit
c4670946e6
|
@ -8,6 +8,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/*PRODUCTION*/
|
||||
const TESTS = typeof PRODUCTION === 'undefined';
|
||||
const TEST_ARGS = () => {
|
||||
const _basePath = path.resolve(__dirname, '..', '..');
|
||||
|
|
|
@ -4,6 +4,7 @@ import del from 'del';
|
|||
import copy from 'gulp-copy';
|
||||
import rename from 'gulp-rename';
|
||||
import inject from 'gulp-inject-string';
|
||||
import replace from 'gulp-replace';
|
||||
import copydeps from './scripts/copydeps';
|
||||
import file from 'gulp-file';
|
||||
import editjson from 'gulp-json-editor';
|
||||
|
@ -17,7 +18,7 @@ import editorpkg from './editor/package';
|
|||
gulp.task('core-main', function () {
|
||||
return pump([
|
||||
gulp.src('core/dist/main.js'),
|
||||
inject.after(`'use strict';\n`, 'const PRODUCTION = true;\n'),
|
||||
replace('/*PRODUCTION*/', 'const PRODUCTION = true;'),
|
||||
rename(`core.${corepkg.version}.js`),
|
||||
gulp.dest('release/core')
|
||||
]);
|
||||
|
|
|
@ -1785,6 +1785,12 @@
|
|||
"underscore": "~1.4.4"
|
||||
}
|
||||
},
|
||||
"binaryextensions": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.2.tgz",
|
||||
"integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==",
|
||||
"dev": true
|
||||
},
|
||||
"bl": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
|
||||
|
@ -3046,6 +3052,12 @@
|
|||
"safer-buffer": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"editions": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz",
|
||||
"integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==",
|
||||
"dev": true
|
||||
},
|
||||
"editorconfig": {
|
||||
"version": "0.15.2",
|
||||
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.2.tgz",
|
||||
|
@ -5387,6 +5399,17 @@
|
|||
"integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==",
|
||||
"dev": true
|
||||
},
|
||||
"gulp-replace": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz",
|
||||
"integrity": "sha512-lgdmrFSI1SdhNMXZQbrC75MOl1UjYWlOWNbNRnz+F/KHmgxt3l6XstBoAYIdadwETFyG/6i+vWUSCawdC3pqOw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"istextorbinary": "2.2.1",
|
||||
"readable-stream": "^2.0.1",
|
||||
"replacestream": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"gulp-watch": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-5.0.1.tgz",
|
||||
|
@ -6440,6 +6463,17 @@
|
|||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"istextorbinary": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz",
|
||||
"integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binaryextensions": "2",
|
||||
"editions": "^1.3.3",
|
||||
"textextensions": "2"
|
||||
}
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
|
||||
|
@ -8999,6 +9033,17 @@
|
|||
"remove-trailing-separator": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"replacestream": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz",
|
||||
"integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.3",
|
||||
"object-assign": "^4.0.1",
|
||||
"readable-stream": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"version": "2.88.0",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
|
||||
|
@ -10435,6 +10480,12 @@
|
|||
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
|
||||
"dev": true
|
||||
},
|
||||
"textextensions": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz",
|
||||
"integrity": "sha512-qftQXnX1DzpSV8EddtHIT0eDDEiBF8ywhFYR2lI9xrGtxqKN+CvLXhACeCIGbCpQfxxERbrkZEFb8cZcDKbVZA==",
|
||||
"dev": true
|
||||
},
|
||||
"throttleit": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz",
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"gulp-inject-string": "^1.1.2",
|
||||
"gulp-json-editor": "^2.5.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-watch": "^5.0.1",
|
||||
"hash-files": "^1.1.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
|
|
Loading…
Reference in New Issue