usemin option doesn't work
See original GitHub issueHi, trying to append templates to final script file via usemin option but it doesn’t work:
(I’m using Yeoman)
Here is HTML snippet
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app.js"></script>
<script src="scripts/controllers/main.js"></script>
<!-- endbuild -->
Gruntfile:
// compiles templates to cache
ngtemplates: {
dist: {
options: {
module: 'testApp',
usemin: 'scripts/scripts.js'
},
cwd: '<%= yeoman.app %>',
src: 'views/**/*.html',
dest: '<%= yeoman.app %>/scripts/templates.js'
}
}
...
...
// build task
grunt.registerTask('build', [
'clean:dist',
'bower-install',
'useminPrepare',
'ngtemplates',
'concurrent:dist',
'autoprefixer',
'concat',
'ngmin',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
'rev',
'usemin',
'htmlmin'
]);
when running task:
$ grunt build
grunt throws this error:
Running "ngtemplates:dist" (ngtemplates) task
File dist/scripts/templates.js created.
>> Could not find usemin.generated path matching: scripts/scripts.js
Issue Analytics
- State:
- Created 10 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Why does usemin not accept --htmlmin option? - Stack Overflow
I'm building a distribution copy of a website using npm usemin with --htmlmin option. Running script below from package.json and I expect to ......
Read more >usemin - npm
Extract information from a HTML input file to be processed later. This does not process any files (i.e., it doesn't perform uglify or...
Read more >gulp-usemin | Yarn - Package Manager
gulp-usemin ... Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views). This task is designed for...
Read more >min-width - CSS: Cascading Style Sheets - MDN Web Docs
Setting minimum element width. table { min-width: 75%; } form { min-width: 0; } Copy to Clipboard. Specifications. Specification ...
Read more >How to Use min() and max() in R - DigitalOcean
How to Use min() and max() in R ... Let's see how it works! ... The max function won't return any values if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
resolved this issue. Looks like I was missing
<!-- endbuild -->
in the js section of index.htmlPlease recheck the same. Hope it solves the problem 😃
Very good point! Which one worked?
\
or\\
?