Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Support ngmin
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed May 20, 2014
1 parent 6354178 commit 30f977c
Show file tree
Hide file tree
Showing 3 changed files with 469 additions and 372 deletions.
139 changes: 12 additions & 127 deletions gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

module.exports = function(grunt) {
<<<<<<< HEAD
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Expand Down Expand Up @@ -62,7 +61,7 @@ module.exports = function(grunt) {
mangle: false
},
files: {
'public/dist/application.min.js': '<%= applicationJavaScriptFiles %>'
'public/dist/application.min.js': 'public/dist/application.js'
}
}
},
Expand Down Expand Up @@ -94,6 +93,13 @@ module.exports = function(grunt) {
}
}
},
ngmin: {
production: {
files: {
'public/dist/application.js': '<%= applicationJavaScriptFiles %>'
}
}
},
concurrent: {
default: ['nodemon', 'watch'],
debug: ['nodemon', 'watch', 'node-inspector'],
Expand All @@ -119,118 +125,6 @@ module.exports = function(grunt) {
}
}
});
=======
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
serverViews: {
files: ['app/views/**'],
options: {
livereload: true,
}
},
serverJS: {
files: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js'],
tasks: ['jshint'],
options: {
livereload: true,
}
},
clientViews: {
files: ['public/modules/**/views/*.html'],
options: {
livereload: true,
}
},
clientJS: {
files: ['public/js/**/*.js', 'public/modules/**/*.js'],
tasks: ['jshint'],
options: {
livereload: true,
}
},
clientCSS: {
files: ['public/**/css/*.css'],
tasks: ['csslint'],
options: {
livereload: true,
}
}
},
jshint: {
all: {
src: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js', 'public/js/**/*.js', 'public/modules/**/*.js'],
options: {
jshintrc: true
}
}
},
csslint: {
options: {
csslintrc: '.csslintrc',
},
all: {
src: ['public/modules/**/css/*.css']
}
},
ngmin: {
production: {
files: {
'public/dist/application.js': '<%= applicationJavaScriptFiles %>'
}
}
},
uglify: {
production: {
options: {
mangle: false
},
files: {
'public/dist/application.min.js': 'public/dist/application.js'
}
}
},
cssmin: {
combine: {
files: {
'public/dist/application.min.css': '<%= applicationCSSFiles %>'
}
}
},
nodemon: {
dev: {
script: 'server.js',
options: {
nodeArgs: ['--debug']
}
}
},
concurrent: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
},
env: {
test: {
NODE_ENV: 'test'
}
},
mochaTest: {
src: ['app/tests/**/*.js'],
options: {
reporter: 'spec',
require: 'server.js'
}
},
karma: {
unit: {
configFile: 'karma.conf.js'
}
}
});
>>>>>>> pr/72

// Load NPM tasks
require('load-grunt-tasks')(grunt);
Expand All @@ -248,26 +142,17 @@ module.exports = function(grunt) {
});

// Default task(s).
grunt.registerTask('default', ['jshint', 'csslint', 'concurrent:default']);
grunt.registerTask('default', ['lint', 'concurrent:default']);

// Debug task.
grunt.registerTask('debug', ['jshint', 'csslint', 'concurrent:debug']);
grunt.registerTask('debug', ['lint', 'concurrent:debug']);

<<<<<<< HEAD
// Lint task(s).
grunt.registerTask('lint', ['jshint', 'csslint']);

// Build task(s).
grunt.registerTask('build', ['jshint', 'csslint', 'loadConfig', 'uglify', 'cssmin']);
grunt.registerTask('build', ['lint', 'loadConfig', 'ngmin', 'uglify', 'cssmin']);

// Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
};
=======
// Build task(s).
grunt.registerTask('build', ['jshint', 'csslint', 'loadConfig', 'ngmin', 'uglify', 'cssmin']);

// Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
};
>>>>>>> pr/72
};
Loading

0 comments on commit 30f977c

Please sign in to comment.