e23dd3d3 by Adam Heath

New version.

1 parent f9cc77f3
......@@ -313,6 +313,10 @@ module.exports = function (grunt) {
if (mpConfig.htmlmin) {
initConfig.htmlmin = {
options: mpConfig.htmlmin.options,
dist: {
files: [],
},
};
checkList.push('htmlmin');
}
......@@ -404,7 +408,7 @@ module.exports = function (grunt) {
html: {
options: {
dirs: ['dist/build'],
assetsDirs: ['dist/build'],
assetsDirs: ['dist/build', 'dist/build/lib/bower/jquery-ui/themes/base'],
},
src: [
'dist/build/**/*.html',
......@@ -414,17 +418,14 @@ module.exports = function (grunt) {
},
};
initConfig.clean.montyPython.files[0].src.push('.grunt/usemin');
initConfig.htmlmin = {
dist: {
//options: _.extend({}, mpConfig.htmlmin.options),
files: [{
if (mpConfig.htmlmin) {
initConfig.htmlmin.dist.files.push({
expand: true,
cwd: 'dist/build',
src: '{,*/}*.html',
dest: 'dist/build'
}]
dest: 'dist/build',
});
}
};
}
if (mpConfig.jasmine) {
var src = [
......@@ -551,14 +552,25 @@ module.exports = function (grunt) {
if (mpConfig.images) {
initConfig.imagemin = {
dist: {
files: _.map(mpConfig.images.options.dirs, function (value) {
return {
files: [{
expand: true,
cwd: mpConfig.base + '/' + value,
src: '{,**/}*.{gif,jpeg,jpg,png}',
dest: 'dist/build/' + value,
};
dot: true,
cwd: mpConfig.base,
dest: 'dist/build',
src: _.map(mpConfig.images.options.dirs, function (value) {
return value + '/{,**/}*.{gif,jpeg,jpg,png}';
}),
}]
//
// files: _.map(mpConfig.images.options.dirs, function (value) {
// return {
// expand: true,
// cwd: mpConfig.base + '/' + value,
// src: '{,**/}*.{gif,jpeg,jpg,png}',
// dest: 'dist/build/' + value,
// };
// }),
}
};
initConfig.svgmin = {
......@@ -722,9 +734,11 @@ module.exports = function (grunt) {
options: {
mode: 'gzip',
},
files: _.map(mpConfig.gzip.options.extensions, function(value) {
return {expand: true, cwd: 'dist/build', src: ['**/*.' + value], dest: 'dist/build', extDot: 'last', ext: '.' + value + '.gz'};
}),
files: [
{expand: true, cwd: 'dist/build', src: ['**/*.js'], dest: 'dist/build', extDot: 'last', ext: '.js.gz'},
{expand: true, cwd: 'dist/build', src: ['**/*.css'], dest: 'dist/build', extDot: 'last', ext: '.css.gz'},
{expand: true, cwd: 'dist/build', src: ['**/*.html'], dest: 'dist/build', extDot: 'last', ext: '.html.gz'},
],
},
};
}
......
{
"name": "grunt-monty-python",
"version": "2016.12.16-0",
"version": "0.5",
"description": "Build system for grunt",
"license": "BSD",
"repository": {
......