Skip to content

Instantly share code, notes, and snippets.

@dileeph
Created June 16, 2017 18:56
Show Gist options
  • Save dileeph/a88afd54d4c456060a091a01a42ebef2 to your computer and use it in GitHub Desktop.
Save dileeph/a88afd54d4c456060a091a01a42ebef2 to your computer and use it in GitHub Desktop.
grunt example 1
====package.json==========
{
"name": "app1",
"version": "1.0.0",
"devDependencies": {
"grunt": "^1.0.1"
}
}
======Gruntfile.js===================
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';',
},
dist: {
src: ['js/*.js'],
dest: 'dist/built.js',
},
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-concat');
// Default task(s).
grunt.registerTask('default', ['concat']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment