3ac738d3 by Adam Heath

checkout - dist/index.html has been created.

1 parent bb7445b6
......@@ -23,6 +23,22 @@ module.exports = function (grunt) {
}]
},
},
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: 'src',
dest: 'dist',
src: [
'WEB-INF/{,*/}*.*',
'*.{ico,png,txt}',
'.htaccess',
'{,*/}*.html',
]
}]
},
},
};
var checkList = [];
var buildList = [
......@@ -136,35 +152,92 @@ module.exports = function (grunt) {
},
};
buildList.push('punch:generate');
initConfig.copy.dist.files.push({
expand: true,
dot: true,
cwd: '.grunt/holygrail/punch/output-generate',
dest: 'dist',
src: [
'{,*/}*.html',
]
});
}
if (true) {
initConfig.useminPrepare = {
options: {
dest: 'dist'
},
html: {
options: {
staging: '.grunt/usemin',
},
src: holyGrailTmp + '/punch/output-generate/{,**/}*.html',
},
};
initConfig.usemin = {
options: {
dirs: ['dist']
},
html: {
options: {
dirs: ['dist'],
assetsDirs: ['dist'],
},
src: ['dist/!(scripts){,**/}*.html'],
},
};
initConfig.clean.dist.files[0].src.push('.grunt/usemin');
initConfig.htmlmin = {
dist: {
//options: _.extend({}, common.htmlmin.options),
files: [{
expand: true,
cwd: 'dist',
src: '{,*/}*.html',
dest: 'dist'
}]
}
};
}
initConfig.copy.css: {
files: [{
expand: true,
dot: true,
cwd: 'src',
dest: '.grunt/usemin-css/',
src: _.map(common.css.options.dirs, function (value) {
return value + '/{,**/}*.css';
}),
}]
};
initConfig.clean.dist.files[0].src.push('.grunt/usemin-css');
buildList.push('useminPrepare'); // html
//buildList.push('usemin:views'
buildList.push('requirejs'); // script
//buildList.push('requirejs'); // script
buildList.push('copy:css'); // css
buildList.push('imagemin'); // image
buildList.push('svgmin'); // image
buildList.push('rev:img'); // image
buildList.push('autoprefixer'); // css
/*
'concat:requirejs', // montyPython
'concat:generated', // montyPython
'cssmin', // montyPython
//'uglify:dist',
'copy:dist',
//'modernizr',
'uglify:generated', // montyPython
//'rev:dist', // montyPython
'rev:css', // montyPython
'revconfig', // montyPython
'uglify:bower', // montyPython
'uglify:requireconfig', // montyPython
'rev:requireconfig', // montyPython
'usemin:html', // montyPython
'usemin:css', // montyPython
'htmlmin', // montyPython
*/
//buildList.push('imagemin'); // image
//buildList.push('svgmin'); // image
//buildList.push('rev:img'); // image
//buildList.push('autoprefixer'); // css
//buildList.push('concat:requirejs'); // montyPython
buildList.push('concat:generated'); // montyPython
//buildList.push('cssmin'); // montyPython
//'uglify:dist');
buildList.push('copy:dist');
//'modernizr');
//buildList.push('uglify:generated'); // montyPython
//'rev:dist'); // montyPython
//buildList.push('rev:css'); // montyPython
//buildList.push('revconfig'); // montyPython
//buildList.push('uglify:bower'); // montyPython
//buildList.push('uglify:requireconfig'); // montyPython
//buildList.push('rev:requireconfig'); // montyPython
buildList.push('usemin:html'); // montyPython
//buildList.push('usemin:css'); // montyPython
buildList.push('htmlmin'); // montyPython
grunt.initConfig(initConfig);
......
......@@ -17,6 +17,8 @@
"dependencies": {
"grunt": "~0",
"grunt-contrib-clean": "~0",
"grunt-contrib-concat": "~0",
"grunt-contrib-copy": "~0",
"grunt-contrib-csslint": "~0",
"grunt-contrib-jshint": "~0",
"grunt-contrib-htmlmin": "~0",
......