var del = require('del');
var _ = require('lodash');

function clean(target, done) {
	var dir = './' + target;
	var deleteList = [dir + '/*'];
	deleteList = deleteList.concat(getPreservedFiles(dir));
	return del(deleteList, done);
}

var preservedFiles = [
	'web.config',
	'bower.json',
];

function getPreservedFiles(directory) {
	return _.map(preservedFiles, function(file) {
		return '!' + directory + '/' + file;
	});
}

module.exports = clean;

var defaults = require('./defaults');

module.exports.config = function(gulp) {
	gulp.task('clean', ['clean.debug']);

	gulp.task('clean.debug', function (done) {
		return clean(defaults.debugFolder, done);
	});

	gulp.task('clean.release', function (done) {
		return clean(defaults.releaseFolder, done);
	});
};

var del = require('del');
var _ = require('lodash');

function clean(target, done) {
	var dir = './' + target;
	var deleteList = [dir + '/*'];
	deleteList = deleteList.concat(getPreservedFiles(dir));
	return del(deleteList, done);
}

var preservedFiles = [
	'web.config',
];

function getPreservedFiles(directory) {
	return _.map(preservedFiles, function(file) {
		return '!' + directory + '/' + file;
	});
}

module.exports = clean;

var defaults = require('./defaults');

module.exports.config = function(gulp) {
	gulp.task('clean', ['clean.debug']);

	gulp.task('clean.debug', function (done) {
		return clean(defaults.debugFolder, done);
	});

	gulp.task('clean.release', function (done) {
		return clean(defaults.releaseFolder, done);
	});
};

Clean bower js files now since we will be copying these from the main repo
Clean bower js files now since we will be copying these from the main repo
