newaeonweb / generator-angm

AngularJS Yeoman Generator to help you getting started with a new project based on AngularJS and Angular Material to build large scale applications.
72 stars 24 forks source link

Gruntfile suggestion #12

Open rodabt opened 8 years ago

rodabt commented 8 years ago

Hi,

First of all, great generator. It's very simple and effective.

I started a simple project including angular-plotly library which depends on plotly. Using bower install angular-plotly --save works ok and grunt dev works as expected. However if I do a grunt build it fails with the following error:

Running "concat:build" (concat) task
Warning: Unable to read "app/assets/libs/plotly.js" file (Error code: EISDIR). Used --force, continuing.

The concat task was failing because it treated "plotly.js" as a file a not a folder the correction is easy, just add filter: 'isFile' to Gruntfile.js:

            build: {
                src: [
                    // Angular Project Dependencies,
                    'app/assets/libs/angular/angular.js',
                    'app/assets/libs/{,**/}*.js'
                ],
                filter: 'isFile',
                dest: 'app/assets/js/<%= pkg.name %>-angularbundle.js'
            }

In the future I suggest it should be included by default in the generator.

newaeonweb commented 8 years ago

@rodabt Thanks for the comment. I'm planning a new version with some bug fixes and i'll include the tip. Cheers