thardy / generator-ngbp

Yeoman generator based on the ngBoilerplate kickstarter, a best-practice boilerplate for any scale Angular project built on a highly modular, folder-by-feature structure.
100 stars 23 forks source link

Missing 'copy' tasks for vendor CSS #23

Closed jluna79 closed 9 years ago

jluna79 commented 9 years ago

Hello,

I'm using ui-select. As indicated in the instructions I referenced the necessary files (select.js & select.css) in Gruntfile.js to be copied during build as so:

vendor_files: {
            js: [
                'vendor/angular-ui-select/dist/select.min.js',
            ],
            css: [
                'vendor/angular-ui-select/dist/select.min.css',
            ],
            assets: [
            ]
        }

I noticed that only the .js files are getting copied but not the css files. I reviewed Gruntfile.js and found that there are no vendorcss "copy" tasks. I added the following:

...
build_vendorcss: {
                files: [
                    {
                        src: [ '<%= vendor_files.css %>' ],
                        dest: '<%= build_dir %>/',
                        cwd: '.',
                        expand: true
                    }
                ]
            },
            buildmock_vendorcss: {
                files: [
                    {
                        src: [ '<%= vendor_files.css %>' ],
                        dest: '<%= build_dir %>/',
                        cwd: '.',
                        expand: true
                    }
                ]
            },

I then duplicated all the build_vendorjs references to also execute build_vendorcss.

Hope it is useful to complete the generator's Gruntfile.js in the future :)

thardy commented 9 years ago

I've added this. It's in 0.2.2.

Thanks for finding this.