anaisbetts / grunt-build-atom-shell

Grunt task to build Electron and rebuild node modules
MIT License
122 stars 11 forks source link

Copying should copy empty directories #21

Closed hongrich closed 8 years ago

hongrich commented 9 years ago

grunt.file.copy creates intermediate directories if necessary, but if there are no files inside a directory, this ensures that we still create the directory.

One case where this comes up is that atom-shell creates a bunch of empty directories to make navigator.language work (https://github.com/atom/atom-shell/pull/363/files), so this grunt task should copy those over as well.

RIAEvangelist commented 8 years ago

What is the state of this PR?

hongrich commented 8 years ago

I'm not totally sure this is the best approach anymore, since it leaves around a lot of empty directories. Really all I needed was all the empty *.lproj directories and not all empty directories.

RIAEvangelist commented 8 years ago

I suppose a more elegant way would be to detect if the directory exists or not and to create it if it does not exist. This seems more reliable and elegant than requiring a user to manually create the directory.

RIAEvangelist commented 8 years ago

perhaps @paulcbetts should close this pull request.

hongrich commented 8 years ago

This PR already does that. It only creates the directory if it doesn't exist already. Regardless, I don't think this is the right apporach. I will close it.