Merge pull request #306 from jareguo/master

make CC_EDITOR available in preview mode
This commit is contained in:
Jare Guo
2016-01-31 01:08:29 +08:00
2 changed files with 12 additions and 12 deletions
+11 -11
View File
@@ -24,17 +24,17 @@
// MACROS
// if "global_defs" not preprocessed by uglify, just declare them globally
// (use eval to prevent the uglify from renaming symbols)
if (typeof CC_TEST === 'undefined') {
eval('CC_TEST=typeof describe!=="undefined"||typeof QUnit=="object"');
}
if (typeof CC_EDITOR === 'undefined') {
eval('CC_EDITOR=typeof Editor=="object"&&typeof process=="object"&&"electron" in process.versions');
}
if (typeof CC_DEV === 'undefined') {
eval('CC_DEV=CC_EDITOR||CC_TEST');
}
// if "global_defs" not preprocessed by uglify, just declare them globally,
// this may happened in release version's preview page.
eval(
/* use EVAL to prevent the uglify from renaming symbols */
'if(typeof CC_TEST=="undefined")' +
'CC_TEST=typeof describe!="undefined"||typeof QUnit=="object";' +
'if(typeof CC_EDITOR=="undefined")' +
'CC_EDITOR=typeof Editor=="object"&&typeof process=="object"&&"electron" in process.versions;' +
'if(typeof CC_DEV=="undefined")' +
'CC_DEV=CC_EDITOR||CC_TEST;'
);
// PREDEFINE
+1 -1
View File
@@ -27,7 +27,7 @@
"gulp-rename": "1.2.2",
"gulp-shell": "0.4.1",
"gulp-sourcemaps": "1.5.2",
"gulp-uglify": "1.2.0",
"gulp-uglify": "1.5.1",
"gulp-util": "3.0.6",
"jshint-stylish": "2.1.0",
"require-dir": "0.3.0",