提交 1d4d3f41 编写于 作者: NoSubject's avatar NoSubject

增加sourcemap

上级 fb48ebbd
......@@ -16,6 +16,7 @@ var gulp = require('gulp'),
//let uglify = require('gulp-uglify-es').default;
var through2 = require('through2');
var path = require('path');
var sourceMap = require('gulp-sourcemaps');
var assetRev = require('gulp-tm-asset-rev');
......@@ -506,6 +507,7 @@ function createBaseWorkConcatBodyTask(path, isMin, thisOptions) {
];
var dest = option.dest+'/' + path + '/';
return gulp.src(src)
.pipe(sourceMap.init())
.pipe(concat('js/base_work.js'))
.pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
.pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
......@@ -523,8 +525,10 @@ function createBaseWorkConcatBodyTask(path, isMin, thisOptions) {
remotePath: (option.remotePath || '/') + path
})))
.pipe(gulp.dest(dest))
.pipe(uglify())
.pipe(rename({ extname: '.min.js' }))
.pipe( sourceMap.write("") )
.pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
.pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
host: option.host,
......
......@@ -40,6 +40,7 @@
"gulp-uglify-es": "^2.0.0",
"merge-stream": "^1.0.1",
"minimist": "^1.2.0",
"readline-sync": "^1.4.10"
"readline-sync": "^1.4.10",
"gulp-sourcemaps": "^3.0.0"
}
}
......@@ -6,14 +6,11 @@ MWF.xScript.Macro = MWF.Macro = {
expression: function(code, bind){},
runEvent: function(code, bind, arg){},
run: function(code, bind){
},
exec: function(code, bind){
debugger;
var returnValue;
//try{
if (!bind) bind = window;
//this.bind = bind || window;
var n = 0;
var o = "f"+"_"+n;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册