Skip to content

Commit

Permalink
misc - ensure parent directory is there before copying
Browse files Browse the repository at this point in the history
merged changes to misc task. This closes mklabs#11
  • Loading branch information
mklabs committed Mar 8, 2012
1 parent bb10fb2 commit 09ddafa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tasks/misc.js
Expand Up @@ -45,6 +45,8 @@ task.registerBasicTask('mkdirs', 'Prepares the build dirs', function(data, name)
// only relevant on windows platform, where glob-whatev seems to also return
// dirs, with a trailing `/`
if(src.charAt(src.length - 1) === '/') return file.mkdir(dst);

file.mkdir(path.dirname(dst));
fs.writeFileSync(dst, fs.readFileSync(src));
});

Expand Down

0 comments on commit 09ddafa

Please sign in to comment.