Merge pull request #192 from phated/master

Implement `mkdir -p` for `--output` build option.

Former-commit-id: cb7a6753d15f495a1ab8b0016edd34d5626727de
This commit is contained in:
John-David Dalton
2013-02-23 22:55:18 -08:00
2 changed files with 12 additions and 1 deletions

View File

@@ -1114,9 +1114,11 @@
QUnit.module('output options');
(function() {
var nestedDir = 'test/mkdir/';
var commands = [
'-o a.js',
'--output a.js'
'--output a.js',
'-o ' + nestedDir + 'a.js'
];
commands.forEach(function(command, index) {
@@ -1127,6 +1129,7 @@
build(['-s'].concat(command.split(' ')), function(data) {
equal(path.basename(data.outputPath, '.js'), (++counter ? 'a.min' : 'a'), command);
start();
fs.existsSync(nestedDir) && fs.rmdirSync(nestedDir);
});
});
});