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

Commit

Permalink
feat(grunt): add ngmin
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Dec 28, 2013
1 parent 057ef2c commit 51f4e98
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
bower_components
bower_components
dist
out
20 changes: 17 additions & 3 deletions gruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['jshint', 'karma:unit']);
grunt.registerTask('build-doc', ['uglify', 'copy']);
grunt.registerTask('server', ['karma:start']);
grunt.registerTask('dist', ['ngmin', 'uglify']);

// HACK TO ACCESS TO THE COMPONENT-PUBLISHER
function fakeTargetTask(prefix){
Expand Down Expand Up @@ -86,14 +87,27 @@ module.exports = function (grunt) {
globals: {}
}
},

uglify: {
options: {banner: '<%= meta.banner %>'},
build: {
files: {
'<%= dist %>/build/<%= meta.view.repoName %>.min.js': ['<%= meta.view.repoName %>.js']
}
expand: true,
cwd: 'dist',
src: ['*.js'],
ext: '.min.js',
dest: 'dist'
}
},

ngmin: {
main: {
expand: true,
cwd: 'src',
src: ['*.js'],
dest: 'dist'
}
},

copy: {
main: {
files: [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"grunt-contrib-watch": "0.5.x",
"grunt-conventional-changelog": "1.x",
"grunt-karma": "0.6.x",
"grunt-ngmin": "0.0.x",
"karma": "0.10.x",
"karma-chrome-launcher": "0.1.x",
"karma-coffee-preprocessor": "0.1.x",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function(config) {
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'bower_components/angular-ui-utils/modules/event/event.js',
'ui-map.js',
'src/*',
'test/googlemaps.js',
'test/*Spec.js'
],
Expand Down

0 comments on commit 51f4e98

Please sign in to comment.