grunt-angular-templates icon indicating copy to clipboard operation
grunt-angular-templates copied to clipboard

Breaking change in v0.5.1 when using Concat on Windows

Open HNygard opened this issue 11 years ago • 2 comments

Today I've tried to update grunt-angular-templates from 0.3.10 to 0.5.5. The build failed and I traced the error back to the changes happening in v0.5.1.

I've noticed the comment by @mzgol on 7cdbd768d8b6f1f15a7d93bb458ce32a17af867d:

This doesn't just add the usemin option, this removes the concat option as well. This is a breaking change, you should have changed the version number to 0.6.0, patch releases shouldn't introduce breaking changes... I've just got bitten by that.

Was concat support removed?

Running build on Windows 7. It's running in "Git bash" (cmd with bash).

Compare of changes in v0.5.1: https://github.com/ericclemmons/grunt-angular-templates/compare/v0.5.0...v0.5.1

Output when running Grunt build

Running "ngtemplates" task

Running "ngtemplates:projectname" (ngtemplates) task
Verifying property ngtemplates.projectname exists in config...OK
Files: projectname/src/part1/part1.html, (...), projectname/src/part2/part2.html -> .tmp/templates.js
Options: angular="angular", bootstrap=undefined, concat="dist/projectname/scripts.js", htmlmin={"collapseBooleanAttributes":true,"collapseWhitespace":true,"removeAttributeQuotes":true,"removeComments":true,"r
emoveEmptyAttributes":true,"removeRedundantAttributes":true,"removeScriptTypeAt                                                                                                                        t
ributes":true,"removeStyleLinkTypeAttributes":true}, module={"name":"Projectname","define":false}, prefix="", source=undefined, standalone=false, url=undefined, usemin=null, base="projectname"
Options: angular="angular", bootstrap=undefined, concat="dist/projectname/scripts.js", htmlmin={"collapseBooleanAttributes":true,"collapseWhitespace":true,"removeAttributeQuotes":true,"removeComments":true,"r
emoveEmptyAttributes":true,"removeRedundantAttributes":true,"removeScriptTypeAttributes":true,"removeStyleLinkTypeAttributes":true}, module={"name":"Projectname","define":false}, prefix="", source=undefined,
standalone=false, url=undefined, usemin=null, base="projectname"
Reading projectname/src/part1/part1.html...OK
(...)
Reading projectname/src/part2/part2.html...OK
Writing .tmp/templates.js...OK
File .tmp/templates.js created.
Files: projectname/src/part1/part1.ctrl.js, (...), projectname/src/part2/part2.ctrl.js -> [no dest]
Added .tmp/templates.js to concat:dist/projectname/scripts.js

(...) OTHER TASKS (...)

Running "concat:dist/projectname/scripts.js" (concat) task
Verifying property concat.dist/projectname/scripts\.js exists in config...OK
Files: projectname/src/part1/part1.ctrl.js, (...), projectname/src/part2/part2.ctrl.js, .tmp/templates.js -> [no dest]
Options: separator="\r\n", banner="", footer="", stripBanners=false, process=false
Reading projectname/src/part1/part1.ctrl.js...OK
(...)
Reading projectname/src/part2/part2.ctrl.js...OK
Reading .tmp/templates.js...OK
Writing undefined...ERROR
Warning: Unable to write "undefined" file (Error code: undefined). Use --force to continue.

Aborted due to warnings.

Configuration:

        ngtemplates: {
            projectname: {
                options: {
                    base: '<%= yeoman.app %>',
                    module: {
                        name: 'Projectname',
                        define: false
                    },
                    concat: '<%= yeoman.dist %>/scripts.js',
                    htmlmin: {
                        collapseBooleanAttributes:      true,
                        collapseWhitespace:             true,
                        removeAttributeQuotes:          true,
                        removeComments:                 true, // Only if you don't use comment directives!
                        removeEmptyAttributes:          true,
                        removeRedundantAttributes:      true,
                        removeScriptTypeAttributes:     true,
                        removeStyleLinkTypeAttributes:  true
                      }
                },
                src: '<%= yeoman.app %>/src/**/*.html',
                dest: '.tmp/templates.js'
            }
        },

HNygard avatar Jun 26 '14 09:06 HNygard

Which generator are you using for your project? I'm trying to figure out how to best test this...

ericclemmons avatar Jun 26 '14 14:06 ericclemmons

@ericclemmons : Generator? The config for grunt-angular-templates was manually created. The htmlmin part is untested (going to test and tweak it tomorrow).

HNygard avatar Jun 26 '14 21:06 HNygard