Merge branch '24_source_text'
diff --git a/gulpfile.js b/gulpfile.js
index 799f951..51235ea 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -11,6 +11,7 @@
var concat = require('gulp-concat');
var watch = require('gulp-watch');
var cheerio = require('gulp-cheerio');
+var fs = require('fs');
var bm_version = '4.4.15';
@@ -82,6 +83,23 @@
.pipe(gulp.dest(extensionDestination));
});
+gulp.task('tmp', function() {
+ var fileContent = fs.readFileSync("./extension/jsx/initializer.jsx", "utf8");
+ var jsxBuild = '';
+ fileContent.toString().split('\n').forEach(function (line) {
+ //console.log(line);
+ var reg = /evalFile.*'(.*)'/g;
+ var executedRegex = reg.exec(line);
+ if(executedRegex){
+ var path = executedRegex[1];
+ var jsxfileContent = fs.readFileSync("./extension/jsx/"+path, "utf8");
+ jsxBuild += ';\n' + jsxfileContent.toString();
+ }
+ });
+ jsxBuild = '(function(){\n'+jsxBuild+'\n}())';
+ return fs.writeFile('./extension/jsx/build.jsx', jsxBuild);
+});
+
var srcs = [];
@@ -175,5 +193,4 @@
});
gulp.task('buildAll',['buildLightMin','buildLight','buildFullMin','buildFull','buildFullMinZip'], function() {
-});
-
+});
\ No newline at end of file