Hans 601f9b38f8 feat(@angular/cli): move angular-cli to @angular/cli (#4328)
This release is otherwise identical to beta.28.
2017-02-01 18:19:50 -08:00

26 lines
529 B
JavaScript

'use strict';
var fs = require('fs-extra');
var existsSync = require('exists-sync');
var Promise = require('@angular/cli/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();
}
};