I would like to use the build task of the Gruntfile that is part of a yeoman angular-fullstack project. However I would like to have the JS code still readable and also want to avoid asset filenames to be renamed.
so far I changed the Gruntfile in the following:
- Change default flow behavior in useminPrepare
in gruntfile:
useminPrepare: {
html: ['<%= yeoman.client %>/index.html'],
options: {
dest: '<%= yeoman.dist %>/public',
// default flow behavior : https://github.com/yeoman/grunt-usemin#flow
// change the default flow behavior
flow: {
steps: {
js: ['concat'],
css: ['concat']
},
post: {}
}
}
}
- Do not execute imagemin or svgmin
in gruntfile:
concurrent: {
// ...
dist: [
'sass',
// 'imagemin',
// 'svgmin'
]
},
- Change build task
in gruntfile:
grunt.registerTask('build', [
'clean:dist',
'injector:sass',
'concurrent:dist',
'injector',
'wiredep',
'useminPrepare',
'autoprefixer',
'ngtemplates',
'concat',
'ngAnnotate',
'copy:dist',
'cdnify',
//'cssmin',
//'uglify',
// 'rev',
'usemin'
]);
When I build my project I see
- js code is now in all in app.js but readable so its fine
- assets/images is missing
- html partials are missing. Only the index.html is there
Can anyone help me set up a build process for the dist folder that still has the right file names for images and html and js code still readable ? The source files can be in one big file but they should still be readable.