'use strict'
angular.module('dog.Component',[])
.component('dogComponent',{
// templateUrl:'home.html', // this line will be fine
template:`<h1>Anything Here will screw up the code</h1>`
})
所以我使用 gulp 将所有 Angular js 代码编译为一个。似乎在angular 1.5.8或close中,当使用``引号时,uglify无法缩小代码..
'use strict';
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify')
var indexTarget=[
'./page.index/*.js'
]
gulp.task('index',function(){
return gulp.src(indexTarget)
.pipe(concat('index.js'))
.pipe(uglify())
.pipe(gulp.dest('page.index/'))
})
gulp.task("watch", function(){
gulp.watch(jstarget, ["js"])
})
有经验的可以快速浏览一下吗?