I don’t have a script that deploys yet but here’s my build script, note that gives me a minified and non minified version
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Define our source and build folders module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Define our source and build folders
js_src_path: 'src/js',
js_build_path: "build/js",
css_src_path: "src/css",
css_build_path: "build/css",
hbs_src_path: "src/hbs",
// Grunt Tasks
concat: {
options:{
separator: ''
},
js: {
src: [
'<%= js_src_path %>/libs/jquery.js',
'<%= js_src_path %>/libs/handlebars.js',
'<%= js_src_path %>/libs/ember.js',
'<%= js_src_path %>/libs/ember-data.js',
'<%= js_src_path %>/libs/bootstrap.js',
'<%= js_src_path %>/app.js',
'<%= js_src_path %>/hbs.js',
'<%= js_src_path %>/router.js',
'<%= js_src_path %>/models/**/*.js',
'<%= js_src_path %>/views/**/*.js',
'<%= js_src_path %>/controllers/**/*.js',
'<%= js_src_path %>/routes/**/*.js'
],
dest: '<%= js_build_path %>/bundle.js'
},
css:{
src: [
'<%= css_src_path %>/libs/bootstrap.min.css',
'<%= css_src_path %>/libs/bootstrap-responsive.min.css',
'<%= css_src_path %>/default.css'
],
dest: '<%= css_build_path %>/bundle.css'
}
},
uglify: {
options:{
mangle: true,
banner: ''
},
js: {
src: '<%= concat.js.dest %>',
dest:'<%= js_build_path %>/bundle.min.js'
}
},
cssmin: {
css: {
src: '<%= concat.css.dest %>',
dest:'<%= css_build_path %>/bundle.min.css'
}
},
ember_handlebars: {
options: {
processName: function(filename) {
return filename.replace('src/hbs/', '').split('.hbs')[0];
}
},
hbs: {
src: '<%= hbs_src_path %>/**/*.hbs',
dest:'<%= js_src_path %>/hbs.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-ember-handlebars');
// Default task.
grunt.registerTask('default', ['ember_handlebars', 'concat', 'uglify', 'cssmin']);
};
js_src_path: 'src/js',
js_build_path: "build/js",
css_src_path: "src/css",
css_build_path: "build/css",
hbs_src_path: "src/hbs",
// Grunt Tasks
concat: {
options:{
separator: ''
},
js: {
src: [
'<%= js_src_path %>/libs/jquery.js',
'<%= js_src_path %>/libs/handlebars.js',
'<%= js_src_path %>/libs/ember.js',
'<%= js_src_path %>/libs/ember-data.js',
'<%= js_src_path %>/libs/bootstrap.js',
'<%= js_src_path %>/app.js',
'<%= js_src_path %>/hbs.js',
'<%= js_src_path %>/router.js',
'<%= js_src_path %>/models/**/*.js',
'<%= js_src_path %>/views/**/*.js',
'<%= js_src_path %>/controllers/**/*.js',
'<%= js_src_path %>/routes/**/*.js'
],
dest: '<%= js_build_path %>/bundle.js'
},
css:{
src: [
'<%= css_src_path %>/libs/bootstrap.min.css',
'<%= css_src_path %>/libs/bootstrap-responsive.min.css',
'<%= css_src_path %>/default.css'
],
dest: '<%= css_build_path %>/bundle.css'
}
},
uglify: {
options:{
mangle: true,
banner: ''
},
js: {
src: '<%= concat.js.dest %>',
dest:'<%= js_build_path %>/bundle.min.js'
}
},
cssmin: {
css: {
src: '<%= concat.css.dest %>',
dest:'<%= css_build_path %>/bundle.min.css'
}
},
ember_handlebars: {
options: {
processName: function(filename) {
return filename.replace('src/hbs/', '').split('.hbs')[0];
}
},
hbs: {
src: '<%= hbs_src_path %>/**/*.hbs',
dest:'<%= js_src_path %>/hbs.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-ember-handlebars');
// Default task.
grunt.registerTask('default', ['ember_handlebars', 'concat', 'uglify', 'cssmin']);
};