Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup

  • Loading branch information...
commit 7fb8a7b114337c3663a14202d6e99e4479c96277 1 parent 4245b2d
@crcn crcn authored
View
15 lib/build.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.6.2
(function() {
var amdify, async, at, dref, fs, outcome, path, stepc;
@@ -21,9 +21,9 @@
module.exports = (function() {
/*
*/
-
function _Class(ops, packageManagers) {
var baseDir;
+
this.ops = ops;
this._jam = packageManagers.packageManagers.jam;
this._directory = process.cwd();
@@ -40,6 +40,7 @@
_Class.prototype.run = function(callback) {
var dir, o, output, self;
+
o = outcome.e(callback);
dir = this._directory + "/node_modules";
output = this._output;
@@ -63,17 +64,20 @@
_Class.prototype._fixPackage = function(dirs, next) {
- var d,
+ var d, pkgPath,
_this = this;
+
return next();
d = {};
dirs.map(function(dir) {
var bn;
+
bn = path.basename(dir);
return d[bn] = path.join(_this._prefix, bn, require.resolve(dir).replace(dir, "").replace(".js", ""));
});
dref.set(this.ops.pkg, "jam.config.paths", d);
- return fs.writeFile(path.join(this.ops.dir, "package.json"), JSON.stringify(this.ops.pkg, null, 2), next);
+ pkgPath = path.join(this.ops.dir, "package.json");
+ return fs.writeFile(pkgPath, JSON.stringify(this.ops.pkg, null, 2), next);
};
/*
@@ -94,6 +98,7 @@
_Class.prototype._amdifyAll = function(dirs, callback) {
var _this = this;
+
return async.map(dirs, (function(dir, callback) {
return _this._amdify(dir, function(err) {
return callback();
@@ -107,11 +112,13 @@
_Class.prototype._amdify = function(dir, callback) {
var _this = this;
+
return amdify({
entry: require.resolve(dir),
prefix: ""
}, outcome.e(callback).s(function(bundle) {
var transformer;
+
transformer = new at.Template("amd");
transformer = new at.Copy({
output: _this._output
View
4 lib/index.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.6.2
(function() {
var Build, NoJam, PackageManagers, outcome;
@@ -11,7 +11,6 @@
NoJam = (function() {
/*
*/
-
function NoJam(ops) {
this._packageManager = new PackageManagers();
this._build = new Build(ops, this._packageManager);
@@ -34,6 +33,7 @@
NoJam.prototype.install = function(packages, callback) {
var _this = this;
+
return this._packageManager.install(packages, function() {
return _this.rebuild(callback);
});
View
4 lib/packageManagers/base.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.6.2
(function() {
var spawn, toarray;
@@ -9,7 +9,6 @@
module.exports = (function() {
/*
*/
-
function _Class(binName) {
this.binName = binName;
}
@@ -45,6 +44,7 @@
_Class.prototype._exec = function(args, callback) {
var proc,
_this = this;
+
proc = spawn(this.binName, args);
proc.stdout.on("data", function(chunk) {
return process.stdout.write(chunk);
View
7 lib/packageManagers/index.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.6.2
(function() {
var JAM, NPM, async;
@@ -11,7 +11,6 @@
module.exports = (function() {
/*
*/
-
function _Class(binName) {
this.binName = binName;
this.packageManagers = {
@@ -27,11 +26,13 @@
_Class.prototype.install = function(packages, cb) {
var _this = this;
+
if (cb == null) {
cb = (function() {});
}
return async.forEach(packages, (function(pkg, next) {
var pm, pmanagers;
+
pmanagers = _this._all;
pm = pkg.split(":");
if (pm.length === 2) {
@@ -73,8 +74,10 @@
_Class.prototype._exec = function(packageManagers, args, runAll, callback) {
var next,
_this = this;
+
next = function() {
var arg, packageManager;
+
packageManager = _this.packageManagers[packageManagers.shift()];
if (!packageManager) {
return callback();
View
3  lib/packageManagers/jam.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.6.2
(function() {
var Base,
__hasProp = {}.hasOwnProperty,
@@ -7,7 +7,6 @@
Base = require("./base");
module.exports = (function(_super) {
-
__extends(_Class, _super);
/*
View
3  lib/packageManagers/npm.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.6.2
(function() {
var Base,
__hasProp = {}.hasOwnProperty,
@@ -7,7 +7,6 @@
Base = require("./base");
module.exports = (function(_super) {
-
__extends(_Class, _super);
/*
View
4 makefile
@@ -5,4 +5,8 @@ all:
coffee -o lib -c src
+all-watch:
+ coffee -o lib -cw src
+
+
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "nojam",
- "version": "0.0.2",
+ "version": "0.0.3",
"description": "nodejam =======",
"main": "./lib/index.js",
"scripts": {
View
4 src/build.coffee
@@ -73,7 +73,9 @@ module.exports = class
dref.set @ops.pkg, "jam.config.paths", d
- fs.writeFile path.join(@ops.dir, "package.json"), JSON.stringify(@ops.pkg, null, 2), next
+ pkgPath = path.join(@ops.dir, "package.json")
+
+ fs.writeFile pkgPath, JSON.stringify(@ops.pkg, null, 2), next
###
Please sign in to comment.
Something went wrong with that request. Please try again.