Questions tagged [gulp-uglify]

gulp-uglify is a gulp plugin for files minification using UglifyJS.

gulp-uglify integrates files minification using UglifyJS into gulp workflow. It's as easy to use as:

var uglify = require('gulp-uglify');

gulp.task('make-it-ugly', function() {
  return gulp.src('app/components/*.js')
    .pipe(uglify())
    .pipe(gulp.dest('build'));
});

gulp-uglify npm package: https://www.npmjs.com/package/gulp-uglify.

251 questions
0
votes
2 answers

Gulp - sourcemaps aren't loading source in Chrome

I haven't tested all browses but I use chrome regularly. With Grunt I had no problem with uglify and the map file produced. In Chrome, when in the developer tools, both the min.js and the original .js are loaded. I'm trying to learn Gulp and after…
user3448990
  • 323
  • 6
  • 15
0
votes
2 answers

Display javascript error when using gulp

hi all i am using gulp uglify and concat to minify js code. However, i would like to have a way to detect any coding error in the original dev js code so that i can check the original code and not only notified after minified. May I know how can i…
davidlee
  • 5,611
  • 17
  • 56
  • 82
0
votes
0 answers

Gulp uglify doesn't work

I try to systematize some development works on my project. For this goal I use gulp, and one of stubborn module: gulp-uglify. I have short script: var gulp = require('gulp'), gp_concat = require('gulp-concat'), gp_rename =…
AlekseyDanchin
  • 290
  • 3
  • 14
0
votes
1 answer

AngularJS code not minifying proper despite using array syntax in controllers

It's a well known issue in angular to need to use the special array syntax when bringing in dependencies into controllers to avoid minification problems, so I have been using that notation. But it seems that the injector is still having issues with…
Saxophlutist
  • 293
  • 5
  • 21
-1
votes
1 answer

Gulp `build` not working as expected, gives only `index.html` as output

I am packing my application using gulp. But I am getting only the index.html as a out put. I am not able to see vendar.js,app.js files with all css files added in the index.html file. my expectation is : get all files from index.html href and src.…
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
-1
votes
1 answer

gulp maintain same destination path as in the source

I have a below angular folder structure . I want to uglify/minify the js and html files. Finally I want the same folder structure is maintained in the "build" folder. How can I do this in gulp? client views index.html …
JavaUser
  • 25,542
  • 46
  • 113
  • 139
-1
votes
2 answers

Gulp Concat and Uglify in Folder

I have this Folder Structure in my Project: |- /src |-- components |-- folder1 |-- subfolder1 |-- file1.js |-- file2.js |-- file3.js |-- folder2 |-- subfolder2 |--…
mamsoudi
  • 3,999
  • 1
  • 15
  • 24
-1
votes
1 answer

pdfjs-dist bower and gulp concatenation and minification silently fail

I'm using pdf.js in an angular project. Building with gulp in production mode works fine, but the production build produces non-working code that fails silently without and warnings or errors, whatsoever. I never get a viewer canvas.
leisurelarry
  • 353
  • 2
  • 12
-1
votes
3 answers

gulp-uglify is creating bad javascript

I am working with AngularJS, and I have my application JS setup like the following. var userApp = angular.module('userApp',['ngRoute','ngAnimate', 'bw.paging', 'appConfig', 'userControllers']); userApp.run(function($rootScope, $location) { …
Jane Wayne
  • 8,205
  • 17
  • 75
  • 120
-2
votes
1 answer

How use Angular gulp uglify?

gulp.task("uglify", function () { return ( gulp .src("dist/alparslan-oto/main.js") .pipe(rename("main.js")) .pipe(sourcemaps.init()) .pipe(uglify()) // .pipe(sourcemaps.write()) // Inline source maps. //…
Ali Parlatti
  • 47
  • 1
  • 7
-2
votes
1 answer

Code stops working when I minimize it

There is a working code:drag-and-drop Code does not work when through the GULP uglify() 'use strict'; const gulp = require('gulp'); const $ = require('gulp-load-plugins')(); const uglifyes = require('uglify-es'); const composer =…
Vlad74
  • 13
  • 5
1 2 3
16
17