Skip to content

Instantly share code, notes, and snippets.

@asad01304
Created June 11, 2014 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asad01304/3ed0496c3d650e3ca988 to your computer and use it in GitHub Desktop.
Save asad01304/3ed0496c3d650e3ca988 to your computer and use it in GitHub Desktop.
Sample grunt file
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ";\n"
},
dist: {
// the files to concatenate
src: [
"src/Pii/EditorBundle/Resources/editorJs/editor.js",
"src/Pii/EditorBundle/Resources/editorJs/pii.base.js",
"src/Pii/EditorBundle/Resources/editorJs/pii.events.js",
"src/Pii/EditorBundle/Resources/editorJs/pii.fis-iframes.js",
"src/Pii/EditorBundle/Resources/editorJs/pii.workflow.js"
],
dest: "src/Pii/EditorBundle/Resources/public/js/pii.editor.min.js"
}
},
html2js_templating: {
default_options : {
options: {
shortNaming : true
},
files: {
"src/Pii/EditorBundle/Resources/public/js/template.js" : "src/Pii/EditorBundle/Resources/templates/*"
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-html2js-templating');
grunt.registerTask('default', ['html2js_templating','concat']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment