gulp-minify

Minifying AngularJS application issues

隐身守侯 提交于 2019-12-25 00:25:58
问题 I have an application written in AngularJS and Bootstrap that works perfectly well, but when I tried to minify it I got problems. The index.html of my app is: <!DOCTYPE html> <html lang="es-ES" > <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Vebor Editor</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material

gulp-minify without rename original files

梦想与她 提交于 2019-12-11 09:59:41
问题 It is possible minify js files without add -min suffix? I want keep original name. gulp.task("js-external-release", function() { gulp.src(config.vendorJs) .pipe(minify()) .pipe(gulp.dest(config.dist + "/scripts")); }); 回答1: Use gulp-uglify instead - it doesn't rename files, which is the default behavior for most gulp plugins. var gulp = require('gulp'); var uglify = require('uglify'); gulp.task("js-external-release", function() { gulp.src(config.vendorJs) .pipe(uglify()) .pipe(gulp.dest

Error after Minification of angular js. Error: [$injector:unpr] Unknown provider: eProvider <- e <- makeErrorsDirective

旧巷老猫 提交于 2019-11-30 05:41:08
问题 I used Gulp to minify my entire js files. Once minified I got an error like the following: [$injector:unpr] Unknown provider: eProvider <- e <- makeErrorsDirective. I had a Custom directive in my controller file. var myhubdashboardControllers = angular.module('vpdashboardmodule', []); .directive('mhDashboard', function ($http, authService, apiService) { return { restrict: 'EA', scope: { name: '@', dash: '@', report: '@', disname: '@', disdesc: '@', distot: '@' }, templateUrl: 'views/dashboard