Skip to content

Commit

Permalink
added a very basic browserify grunt task, #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kapusta committed May 2, 2017
1 parent 14a9585 commit 5647f25
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-browserify');

// if you simply run 'grunt' these default tasks will execute, IN THE ORDER THEY APPEAR!
grunt.registerTask('default', ['clean', 'babel', 'ngtemplates', 'concat', 'cssmin', 'copy']);
grunt.registerTask('default', ['clean', 'babel', 'browserify', 'ngtemplates', 'concat', 'cssmin', 'copy']);

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Expand All @@ -33,7 +34,7 @@ module.exports = function (grunt) {
comments: false,
compact: true,
sourceMaps: true,
minified: true,
minified: false,
presets: ['es2015'],
plugins: ['angularjs-annotate']
},
Expand All @@ -43,6 +44,17 @@ module.exports = function (grunt) {
}
},

// https://github.com/jmreidy/grunt-browserify
browserify: {
ngbp: {
src: ['./tmp/ngbp.annotated.js'],
dest: './tmp/browserified.js',
options: {
require: ['angular'],
}
}
},

// https://github.com/ericclemmons/grunt-angular-templates/blob/master/README.md
ngtemplates: {
'ngbp': {
Expand Down

0 comments on commit 5647f25

Please sign in to comment.