alanshaw / grunt-include-replace

Grunt task to include files and replace variables. Allows for parameterised includes.
MIT License
200 stars 45 forks source link

Multitask not working, not compiling #43

Closed jepser closed 10 years ago

jepser commented 10 years ago

I'm trying to add includereplace, to a multitask, but it simply doesn't works, it do nothing...

Can you check if the task runs with multitask?

includereplace : {
development : {
                files : [
                    {
                        cwd : 'src/',
                        src: ['*.html', 'pages/*.html'],
                        dest : '<%= dirs.devput %>',
                        expand : true
                    }
                ]
            },
}
grunt.registerMultiTask('build','Builds the app according to the environment',function(){
        var env = this.target;
        var outputDirs = {
            development:'dev',
            production:'dist'
        };

        grunt.config('dirs.output',outputDirs[env]);
        grunt.task.run('jshint');
        grunt.task.run('less:'+env);
        grunt.task.run('includereplace:' + env);
        grunt.task.run('concat:'+env);
        grunt.task.run('uglify:'+env);
        grunt.task.run('copy');
        grunt.task.run('clean');
    });
jepser commented 10 years ago

Never mind, I found the solution, in the grunt.config('dirs.ouput', outpuDirs[env]), that made devput, the directory I was working on, to don't exist.