Uglifyjs is a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on NodeJS, but it should work on any JavaScript platform supporting the CommonJS module system.
Questions tagged [uglifyjs]
847 questions
0
votes
1 answer
Implement const in grunt from terminal
I want to get const name from the terminal using grunt, and use it in uglify. This is what i want to happen:
uglify: {
options: {
sourceMap: true,
compress: {
global_defs: {
:…

Zbun
- 4,875
- 4
- 19
- 28
0
votes
2 answers
Is it possible to only minify unminified JS files with grunt uglify
I want to use this grunt uglify setup shown in the accepted answer here: How to minify multiple Javascript files in a folder with UglifyJS?
However I only want to run it on files that are unminified, can uglify check this or not?
If not, any way of…

Joe Taylor
- 579
- 1
- 6
- 21
0
votes
1 answer
Use uglifyjs in Publish Profile
This is a snippet of my Publish Profile:
Certain files…

maxmoore14
- 701
- 7
- 26
0
votes
0 answers
uglify - read source filepaths from a file?
I am using uglify in Grunt to minify and concatenate my javascript files. I have stored the filepaths of those js files in a file called "loadlist". I was wondering if there is any way I can make pass "loadlist" to uglify so that it can read and…

cepsr
- 1
- 1
0
votes
1 answer
Grunt uglify 0.5 not writing source map?
So Im trying to add source maps to my js project. Im using a very simple uglify command, but every time I run the task, I get an error. Im using uglify 0.5
I have pasted the error and the uglify task below. It minifies and outputs the file just…

MFD3000
- 854
- 1
- 11
- 26
0
votes
1 answer
How grunt uglify plugin works?
I have a simple question: how does uglify work? Does it run, and write uglified code straight into the target directory, or does it create a temporary file and then replace target with the prepared file when task is over?

socm_
- 783
- 11
- 28
0
votes
1 answer
gulp-uglifyjs error when gulp.src returns no files
I have a unknown number of folders inside a directory called app that I am looping through to create a folderName.min.js for each.
Gulp script:
var es = require('event-stream');
var uglify = require('gulp-uglifyjs');
var fs = require('fs');
var path…

Dustin
- 8,217
- 11
- 33
- 44
0
votes
1 answer
Uncaught Object when minifying simple Angular app with Grunt
I have a simple Angular app that is defined like so:
index.html
waApp.js
(function() {
var waApp = angular.module('waApp', [],…
{[ test ]}

Tom
- 8,536
- 31
- 133
- 232
0
votes
0 answers
Removing items from Angular library and compressing
I was looking at the unminified version of the 1.2.8 angular library (https://code.angularjs.org/1.2.8/angular.js). There are a number of directives that i will never use in my application, such…

Oam Psy
- 8,555
- 32
- 93
- 157
0
votes
1 answer
Optimising js for production - Lots of small or one large js file
I have an AngularJS app, which I am looking to optimise for speed.
I am currently uglifying and concatenating all my bower_components which I require into a vendor.js file.
I am currently uglifying and concatenating all my custom js into a…

Gravy
- 12,264
- 26
- 124
- 193
0
votes
1 answer
Angular code mangled causes "Unknown Provider" message
I want to mangle my AngularJS file, and it works for almost the whole part. However, when I click through the app and navigate to the only part that uses ngLazyBind and angular-history, I get the following issue: Error: [$injector:unpr] Unknown…

Zambezi
- 767
- 1
- 9
- 19
0
votes
1 answer
Add a comment with date or an incrementing "version" number to js, css or html files using a preprocessor?
I am working on a project for which the end client gets a lot of build.
Sometimes a fix is reported not repaired when it has been and it turns out the latest build has not been uploaded by they tech team. Our solution to this has been to comment by…

Kevin Mann
- 721
- 1
- 7
- 14
0
votes
1 answer
How to get Grunt working..?
I have read a lot of different posts before asking here but I can't get through that error "Uglify not found"..
I have downloaded node.js, uglfy.js.. Shortly I have followed all the steps here..
How to install grunt and how to build script with…

user3464303
- 85
- 8
0
votes
0 answers
File list resolver for grunt
I'm using grunt-contrib-uglify to build my asmcrypto.js project. It's properly structured and split into individual components residing each at own folder.
Now I'd like to give a user an option to select wich components to include into resulting…

vibornoff
- 59
- 2
0
votes
1 answer
Webstorm Uglify after Traceur compiler
I am using googles traceur (https://github.com/google/traceur-compiler) and have set up webstorm to watch traceur files and output them to a "public" directory.
Here is my traceur watcher arguments
--out public/$FilePathRelativeToProjectRoot$…

Piercey4
- 1,318
- 11
- 10