Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 51f4e98

Browse files
committed
feat(grunt): add ngmin
1 parent 057ef2c commit 51f4e98

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules
2-
bower_components
2+
bower_components
3+
dist
4+
out

gruntFile.js

+17-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = function (grunt) {
66
grunt.registerTask('default', ['jshint', 'karma:unit']);
77
grunt.registerTask('build-doc', ['uglify', 'copy']);
88
grunt.registerTask('server', ['karma:start']);
9+
grunt.registerTask('dist', ['ngmin', 'uglify']);
910

1011
// HACK TO ACCESS TO THE COMPONENT-PUBLISHER
1112
function fakeTargetTask(prefix){
@@ -86,14 +87,27 @@ module.exports = function (grunt) {
8687
globals: {}
8788
}
8889
},
90+
8991
uglify: {
9092
options: {banner: '<%= meta.banner %>'},
9193
build: {
92-
files: {
93-
'<%= dist %>/build/<%= meta.view.repoName %>.min.js': ['<%= meta.view.repoName %>.js']
94-
}
94+
expand: true,
95+
cwd: 'dist',
96+
src: ['*.js'],
97+
ext: '.min.js',
98+
dest: 'dist'
99+
}
100+
},
101+
102+
ngmin: {
103+
main: {
104+
expand: true,
105+
cwd: 'src',
106+
src: ['*.js'],
107+
dest: 'dist'
95108
}
96109
},
110+
97111
copy: {
98112
main: {
99113
files: [

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"grunt-contrib-watch": "0.5.x",
1717
"grunt-conventional-changelog": "1.x",
1818
"grunt-karma": "0.6.x",
19+
"grunt-ngmin": "0.0.x",
1920
"karma": "0.10.x",
2021
"karma-chrome-launcher": "0.1.x",
2122
"karma-coffee-preprocessor": "0.1.x",

ui-map.js renamed to src/ui-map.js

File renamed without changes.

test/karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function(config) {
1717
'bower_components/angular/angular.js',
1818
'bower_components/angular-mocks/angular-mocks.js',
1919
'bower_components/angular-ui-utils/modules/event/event.js',
20-
'ui-map.js',
20+
'src/*',
2121
'test/googlemaps.js',
2222
'test/*Spec.js'
2323
],

0 commit comments

Comments
 (0)