Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made 'package' always repackage, should be default.

  • Loading branch information...
commit 23221e2d361f3224a1ebdf1f2b8febe1749eaa25 1 parent 2fbfacf
@mde mde authored
Showing with 11 additions and 12 deletions.
  1. +11 −12 lib/package_task.js
View
23 lib/package_task.js
@@ -58,11 +58,12 @@ PackageTask.prototype = new (function () {
this.define = function () {
var self = this
, packageDirPath = this.packageDirPath()
- , taskObj = {}
, compressTaskArr = [];
- desc('Force a rebuild of the package')
- task({'repackage': ['clobberPackage', 'package']});
+ desc('Build the package for distribution');
+ task('package', ['clobberPackage', 'buildPackage']);
+ // Backward-compat alias
+ task('repackage', ['package']);
task('clobberPackage', function () {
exec('rm -fr ' + self.packageDir, function (err, stdout, stderr) {
@@ -72,17 +73,16 @@ PackageTask.prototype = new (function () {
}, true);
desc('Remove the package')
- task({'clobber': ['clobberPackage']});
+ task('clobber', ['clobberPackage']);
for (var p in _compressOpts) {
if (this['need' + p]) {
(function (p) {
- var filename = self.packageDir + '/' + self.packageName() + _compressOpts[p].ext
- , taskObj = {};
+ var filename = self.packageDir + '/' + self.packageName() +
+ _compressOpts[p].ext;
compressTaskArr.push(filename);
- taskObj[filename] = [packageDirPath];
- file(taskObj, function () {
+ file(filename, [packageDirPath], function () {
var opts = _compressOpts[p];
// Move into the package dir to compress
process.chdir(self.packageDir);
@@ -99,13 +99,12 @@ PackageTask.prototype = new (function () {
}
}
- desc('Build the package for distribution');
- task({'package': compressTaskArr}, function () {});
+ task('buildPackage', compressTaskArr, function () {});
directory(this.packageDir);
- taskObj[packageDirPath] = [this.packageDir].concat(self.packageFiles.toArray());
- file(taskObj, function () {
+ file(packageDirPath,
+ [this.packageDir].concat(self.packageFiles.toArray()), function () {
var fileList = [];
self.packageFiles.forEach(function (name) {
var f = path.join(self.packageDirPath(), name)
Please sign in to comment.
Something went wrong with that request. Please try again.