Note that there are some explanatory texts on larger screens.

plurals
  1. POGrunt include - different config for dev(serve) and prod(dist) mode
    text
    copied!<p>I am struggling with <a href="https://github.com/vanetix/grunt-includes" rel="nofollow">grunt-includes</a> task, I wish to have 2 different task depends on configuration, ex: </p> <pre><code> includes: { server: { files: { src: ['index.html'], // Source files dest: '.tmp/', // Destination directory cwd: 'app', flatten: true }, options: { silent: true, banner: '&lt;!-- I am a &lt;% includes.files.dest %&gt; --&gt;' } }, build: { files: { src: ['index.html'], // Source files dest: 'dist', // Destination directory cwd: 'app', flatten: true }, options: { silent: true, banner: '' } } }); </code></pre> <p>and </p> <pre><code> grunt.registerTask('serve', function (target) { if (target === 'dist') { return grunt.task.run(['build', 'connect:dist:keepalive']); } grunt.task.run([ 'clean:server', 'configureProxies', 'includes:server',&lt;====== 'concurrent:server', 'autoprefixer', 'connect:livereload', 'watch' ]); }); grunt.registerTask('build', [ 'clean:dist', 'includes:build', &lt;====== 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'ngmin', 'copy:dist', 'cdnify', 'cssmin', 'uglify', 'rev', 'usemin' ]); </code></pre> <p>Unfortunately both tasks return <strong>"Warning: An error occurred while processing a template (Cannot read property 'dest' of undefined)."</strong></p> <p>Any idea why it happens? grunt-include v 0.4.0</p> <p>==================== SOLUTION ==============</p> <p>I found solution on Github <a href="http://github.com/vanetix/grunt-includes/issues/17" rel="nofollow">github.com/vanetix/grunt-includes/issues/17</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload