Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
85
rated 0 times [  87] [ 2]  / answers: 1 / hits: 49836  / 12 Years ago, tue, november 13, 2012, 12:00:00

there are some js files in static/js/



    1. a.js
2. b.js
3. c.js


how to config grunt.js to get below files:



    1. a.min.js
2. b.min.js
3. c.min.js


as far, I have to type specific file name:



  min: {
dist: {
src: 'js/**/*.js',
dest: 'js/min/xxx.min.js'
}
}

More From » compression

 Answers
18

Had the same problem and found a solution that would automatically minify all my scripts separately:



uglify: {
build: {
files: [{
expand: true,
src: '**/*.js',
dest: 'build/scripts',
cwd: 'app/scripts'
}]
}
}

[#82024] Sunday, November 11, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kourtney

Total Points: 368
Total Questions: 103
Total Answers: 85

Location: Bonaire
Member since Sat, May 1, 2021
3 Years ago
kourtney questions
Sun, Oct 4, 20, 00:00, 4 Years ago
Tue, Oct 29, 19, 00:00, 5 Years ago
Thu, Apr 4, 19, 00:00, 5 Years ago
Fri, Mar 1, 19, 00:00, 5 Years ago
;