Grunt protractor coverage exclude files or directory angularjs

Posted: February 16, 2015 in web

Using ionic framework or any angular app by default the plugin cover all js files including js files under lib.

See one solution below.
Gruntfile.js

...

 copy: {
            'instrument': {
                files: [{
                        src: ['www/**/*', '!www/js/**/*.js'],    // add all files including lib folder, but exclude main js files
                        dest: 'instrumented/'
                    }]
            }
        },
        instrument: {
            files: ['www/**/*.js', '!www/lib/**/*.js'],      // instrument all js files but exclude js under lib
            options: {
                basePath: "instrumented"
            }
        },
....
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s