Skip to content

Commit

Permalink
fix(build): remove mangle to preserve controller name
Browse files Browse the repository at this point in the history
It will be changed in next version
  • Loading branch information
davinkevin committed Nov 8, 2015
1 parent 179cc0b commit 2508fe2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
22 changes: 12 additions & 10 deletions gulp/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,25 @@ gulp.task('build:jspm', function(cal){
});
});

gulp.task('build:js', () => {
return gulp.src(`${paths.release.root}/${paths.app.name}.js`)
gulp.task('build:js', () =>
gulp.src(`${paths.release.root}/${paths.app.name}.js`)
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(uglify({
mangle : false
}))
.pipe(rename({suffix : '.min'}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.release.root))
});
);

gulp.task('build:css', () => {
return gulp.src(`${paths.releaseDir}/${paths.app.name}.css`)
gulp.task('build:css', () =>
gulp.src(`${paths.releaseDir}/${paths.app.name}.css`)
.pipe(minifyCSS())
.pipe(replace(/url\([^\)]*jspm_packages[^\)]*\/fonts\/([^\)]*)\)/g, 'url(/fonts/$1)'))
.pipe(rename({suffix : '.min'}))
.pipe(gulp.dest(paths.release.root))
});
);

gulp.task('build:index', () => {
let sources = gulp.src(prodFiles, {read: false});
Expand All @@ -51,11 +53,11 @@ gulp.task('build:index', () => {
.pipe(gulp.dest(paths.release.root))
});

gulp.task('build:fonts', () => {
gulp.task('build:fonts', () =>
gulp.src([paths.jspm.fonts, paths.glob.projectFonts, '!'+paths.glob.fonts])
.pipe(flatten())
.pipe(gulp.dest(paths.release.fonts));
});
.pipe(gulp.dest(paths.release.fonts))
);

gulp.task('build:pre-clean', (cb) =>
del([`${paths.release.root}/**/*`, `!${paths.release.root}/.keep`], cb)
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
"stomp-websocket": "github:jmesnil/stomp-websocket@^2.3.4",
"systemjs/plugin-text": "github:systemjs/plugin-text@^0.0.2",
"text": "github:systemjs/plugin-text@^0.0.2",
"videogular": "github:2fdevs/bower-videogular@^1.3.2",
"videogular-buffering": "github:2fdevs/bower-videogular-buffering@^1.3.2",
"videogular-controls": "github:2fdevs/bower-videogular-controls@^1.3.2",
"videogular-overlay-play": "github:2fdevs/bower-videogular-overlay-play@^1.3.2",
"videogular-poster": "github:2fdevs/bower-videogular-poster@^1.3.2",
"videogular-themes-default": "github:2fdevs/bower-videogular-themes-default@^1.3.2"
"videogular": "github:videogular/bower-videogular@^1.3.2",
"videogular-buffering": "github:videogular/bower-videogular-buffering@^1.3.2",
"videogular-controls": "github:videogular/bower-videogular-controls@^1.3.2",
"videogular-overlay-play": "github:videogular/bower-videogular-overlay-play@^1.3.2",
"videogular-poster": "github:videogular/bower-videogular-poster@^1.3.2",
"videogular-themes-default": "github:videogular/bower-videogular-themes-default@^1.3.2"
},
"devDependencies": {
"babel": "npm:babel-core@^5.8.24",
Expand Down

0 comments on commit 2508fe2

Please sign in to comment.