mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-27 18:29:47 +08:00
But we still need to depend on ember-cli's master because the ember-cli/ember-cli#4700 hasn't been released yet
27 lines
566 B
JavaScript
27 lines
566 B
JavaScript
'use strict';
|
|
|
|
var fs = require('fs-extra');
|
|
var existsSync = require('exists-sync');
|
|
var Promise = require('ember-cli/lib/ext/promise');
|
|
var remove = Promise.denodeify(fs.remove);
|
|
var root = process.cwd();
|
|
|
|
module.exports.setup = function(path) {
|
|
process.chdir(root);
|
|
|
|
return remove(path)
|
|
.then(function() {
|
|
fs.mkdirsSync(path);
|
|
});
|
|
};
|
|
|
|
module.exports.teardown = function(path) {
|
|
process.chdir(root);
|
|
|
|
if (existsSync(path)) {
|
|
return remove(path);
|
|
} else {
|
|
return Promise.resolve();
|
|
}
|
|
};
|