e23dd3d3 by Adam Heath

New version.

1 parent f9cc77f3
...@@ -313,6 +313,10 @@ module.exports = function (grunt) { ...@@ -313,6 +313,10 @@ module.exports = function (grunt) {
313 313
314 if (mpConfig.htmlmin) { 314 if (mpConfig.htmlmin) {
315 initConfig.htmlmin = { 315 initConfig.htmlmin = {
316 options: mpConfig.htmlmin.options,
317 dist: {
318 files: [],
319 },
316 }; 320 };
317 checkList.push('htmlmin'); 321 checkList.push('htmlmin');
318 } 322 }
...@@ -404,7 +408,7 @@ module.exports = function (grunt) { ...@@ -404,7 +408,7 @@ module.exports = function (grunt) {
404 html: { 408 html: {
405 options: { 409 options: {
406 dirs: ['dist/build'], 410 dirs: ['dist/build'],
407 assetsDirs: ['dist/build'], 411 assetsDirs: ['dist/build', 'dist/build/lib/bower/jquery-ui/themes/base'],
408 }, 412 },
409 src: [ 413 src: [
410 'dist/build/**/*.html', 414 'dist/build/**/*.html',
...@@ -414,17 +418,14 @@ module.exports = function (grunt) { ...@@ -414,17 +418,14 @@ module.exports = function (grunt) {
414 }, 418 },
415 }; 419 };
416 initConfig.clean.montyPython.files[0].src.push('.grunt/usemin'); 420 initConfig.clean.montyPython.files[0].src.push('.grunt/usemin');
417 initConfig.htmlmin = { 421 if (mpConfig.htmlmin) {
418 dist: { 422 initConfig.htmlmin.dist.files.push({
419 //options: _.extend({}, mpConfig.htmlmin.options),
420 files: [{
421 expand: true, 423 expand: true,
422 cwd: 'dist/build', 424 cwd: 'dist/build',
423 src: '{,*/}*.html', 425 src: '{,*/}*.html',
424 dest: 'dist/build' 426 dest: 'dist/build',
425 }] 427 });
426 } 428 }
427 };
428 } 429 }
429 if (mpConfig.jasmine) { 430 if (mpConfig.jasmine) {
430 var src = [ 431 var src = [
...@@ -551,14 +552,25 @@ module.exports = function (grunt) { ...@@ -551,14 +552,25 @@ module.exports = function (grunt) {
551 if (mpConfig.images) { 552 if (mpConfig.images) {
552 initConfig.imagemin = { 553 initConfig.imagemin = {
553 dist: { 554 dist: {
554 files: _.map(mpConfig.images.options.dirs, function (value) { 555 files: [{
555 return {
556 expand: true, 556 expand: true,
557 cwd: mpConfig.base + '/' + value, 557 dot: true,
558 src: '{,**/}*.{gif,jpeg,jpg,png}', 558 cwd: mpConfig.base,
559 dest: 'dist/build/' + value, 559 dest: 'dist/build',
560 }; 560 src: _.map(mpConfig.images.options.dirs, function (value) {
561 return value + '/{,**/}*.{gif,jpeg,jpg,png}';
561 }), 562 }),
563
564 }]
565 //
566 // files: _.map(mpConfig.images.options.dirs, function (value) {
567 // return {
568 // expand: true,
569 // cwd: mpConfig.base + '/' + value,
570 // src: '{,**/}*.{gif,jpeg,jpg,png}',
571 // dest: 'dist/build/' + value,
572 // };
573 // }),
562 } 574 }
563 }; 575 };
564 initConfig.svgmin = { 576 initConfig.svgmin = {
...@@ -722,9 +734,11 @@ module.exports = function (grunt) { ...@@ -722,9 +734,11 @@ module.exports = function (grunt) {
722 options: { 734 options: {
723 mode: 'gzip', 735 mode: 'gzip',
724 }, 736 },
725 files: _.map(mpConfig.gzip.options.extensions, function(value) { 737 files: [
726 return {expand: true, cwd: 'dist/build', src: ['**/*.' + value], dest: 'dist/build', extDot: 'last', ext: '.' + value + '.gz'}; 738 {expand: true, cwd: 'dist/build', src: ['**/*.js'], dest: 'dist/build', extDot: 'last', ext: '.js.gz'},
727 }), 739 {expand: true, cwd: 'dist/build', src: ['**/*.css'], dest: 'dist/build', extDot: 'last', ext: '.css.gz'},
740 {expand: true, cwd: 'dist/build', src: ['**/*.html'], dest: 'dist/build', extDot: 'last', ext: '.html.gz'},
741 ],
728 }, 742 },
729 }; 743 };
730 } 744 }
......
1 { 1 {
2 "name": "grunt-monty-python", 2 "name": "grunt-monty-python",
3 "version": "2016.12.16-0", 3 "version": "0.5",
4 "description": "Build system for grunt", 4 "description": "Build system for grunt",
5 "license": "BSD", 5 "license": "BSD",
6 "repository": { 6 "repository": {
......