Permalink
Browse files

Fix .gitignore

  • Loading branch information...
1 parent 47bf73a commit 0078d1c9e2368e05229ede84dd8ae7c2080e3079 @mixu committed Jul 30, 2012
View
@@ -1,5 +1,2 @@
test/tmp
-node_modules/
-!test/fixtures/node_modules
-!test/fixtures/node_modules/dependency/node_modules
-
+/node_modules/
View
@@ -6,7 +6,7 @@ TESTS += test/package.test.js
test:
@mocha \
--ui exports \
- --reporter list \
+ --reporter spec \
--slow 2000ms \
--bail \
$(TESTS)
View
@@ -32,7 +32,7 @@ function Renderer(options) {
Renderer.prototype.include = function(f) { this.files.include(this._fullPath(f)); return this; };
Renderer.prototype.exclude = function(f) { this.files.exclude(f); return this; };
Renderer.prototype.handler = function(regex, fn) {
- this.handlers.push({ re: regex, handler: fn});
+ this.build.handlers.push({ re: regex, handler: fn});
return this;
};
View
@@ -13,7 +13,7 @@ function series(callbacks, last) {
next();
}
-var handlers = [
+var globalHandlers = [
{
// take all the .js files and concatenate them
re: new RegExp('.*\.js$'),
@@ -29,6 +29,7 @@ function Package() {
this.basepath = '';
this.files = [];
this.children = [];
+ this.handlers = [];
};
Package.prototype.dependency = function(name, contextPath) {
@@ -79,6 +80,8 @@ Package.prototype._runHandlers = function(selfId, onDone) {
// create tasks for each file
// We will only allow one handler to match each file, since this makes things less confusing
+ var handlers = [].concat(globalHandlers, this.handlers);
+
this.files.forEach(function(filename) {
var matching = handlers.filter(function(handler) {
return handler.re.test(filename);
View
@@ -19,6 +19,6 @@
"main": "lib/glue.js",
"devDependencies": {
"mocha": "1.x",
- "package-json-resolver": "git://github.com/mixu/package-json-resolver.git"
+ "package-json-resolver": "git://github.com/mixu/package-json-resolver.git#master"
}
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -3,7 +3,7 @@ var fs = require('fs'),
assert = require('assert'),
Package = require('../lib/package');
-exports['given a group'] = {
+exports['package'] = {
beforeEach: function(done) {
this.p = new Package();

0 comments on commit 0078d1c

Please sign in to comment.