Skip to content

springroll.json's "librariesCopy" property copies too much... #4

@probityrules

Description

@probityrules

It appears that when files are listed by "librariesCopy" in springroll.json, it not only copies the listed files, it also runs all other grunt-contrib-copy listings. For example, if the following is defined:

"librariesCopy": {
    "components/soundjs/lib/FlashAudioPlugin.swf": "deploy/assets/swfs/"
}

And the SpringRoll game's gruntfile includes:

grunt.config.merge({
    copy: {
        copylevels: {
            cwd: 'assets/levels',
            src: '**/*',
            dest: 'src/config/levels',
            expand: true
        }
    }
});
grunt.registerTask('_pre-build', ['copylevels']);

The "copylevels" task is run twice - once from '_pre-build' and once due to "librariesCopy" being defined. I think this is the bit of code that probably needs to be restricted in some way to the files specifically listed in "librariesCopy":

(grunt.config.get("hasCopy") ? ["copy"] : [])

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions