Skip to content

Instantly share code, notes, and snippets.

@dileeph
Created June 16, 2017 19:34
Show Gist options
  • Save dileeph/c2f004c207c12ce5b7ac36b8aa04b973 to your computer and use it in GitHub Desktop.
Save dileeph/c2f004c207c12ce5b7ac36b8aa04b973 to your computer and use it in GitHub Desktop.
grunt bower file
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"bower-install-simple": {
options: {
color: true,
directory: "lib"
},
"prod": {
options: {
production: true
}
},
"dev": {
options: {
production: false
}
}
},
concat: {
options: {
separator: ';',
},
dist: {
src: ['js/*.js'],
dest: 'temp/built.js',
},
},
uglify: {
options: {
mangle: true
},
my_target: {
files: {
'dest/final.min.js': ['temp/built.js']
}
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks("grunt-bower-install-simple");
// Default task(s).
grunt.registerTask("bower-install", [ "bower-install-simple" ]);
grunt.registerTask('default', ['concat','uglify']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment