Skip to content

Mkdirp Does not Consider CWD #112

@bigtimebuddy

Description

@bigtimebuddy

Was having issues with this line with this plugin trying to run mkdirp. Here's the offending line:
https://github.com/paulmelnikow/rollup-plugin-cpy/blob/master/src/index.js#L28

Example

copy({
  files: "**/*.png",
  dest: '../dist',
  options: {
    cwd: path.join(__dirname, 'src'),
    parents: true
  }
});

This is trying to copy all images in src and copy them to dist, but maintaining the folder structure. The directory that should be created is resolve(dest, options.cwd) not dest. In this case, the plugin with create a folder one directory above, but cpy will copy fine. Maybe this mkdirp isn't even needed here since it seems to be handled by cpy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions