Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gruntfile fails with Warning: Task "taskname" not found

Tags:

gruntjs

This happens with whatever task I'm trying to run. When running with --verbose flag I'm getting:

Initializing Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks. Loading "Gruntfile.js" tasks...OK

No tasks were registered or unregistered.

This is the Gruntfile:

module.export = function (grunt) {

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        karma_coveralls: {
            options: {
                coverage_dir: 'coverage'
            }
        },
        jshint: {
            files: ['app/js/**/*.js', 'Gruntfile.js'],
            options: grunt.file.readJSON('.jshintrc')
        },
        concat: {
            options: {
                seperator: ';'
            },
            dist: {
                src: ['app/js/**/*.js'],
                dest: 'dist/app/js/<%pkg.name%>.js'
            }
        },
        exec: {
            instrument: {
                cmd: function () {
                    return 'istanbul instrument app/js -o app/instrumentjs';
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-karma-coveralls');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.registerTask('coverage', ['coveralls']);
    grunt.registerTask('default', ['jshint']);
    grunt.registerTask('instrument', ['exec: instrument']);
    grunt.registerTask('concat', ['concat']);

};

Any Idea what am I doing wrong?

grunt versions:

grunt-cli v0.1.9 grunt v0.4.1

like image 818
alonisser Avatar asked Oct 28 '13 09:10

alonisser


1 Answers

In your Gruntfile, module.export should be module.exports.

like image 60
badsyntax Avatar answered Sep 23 '22 03:09

badsyntax