Comparing version 0.2.1 to 0.2.2
12
index.js
@@ -8,2 +8,3 @@ 'use strict'; | ||
var glob = require('glob'); | ||
var path = require('path'); | ||
var inter = require('./lib/string/interpolate'); | ||
@@ -29,2 +30,4 @@ var castInter = require('./lib/string/castInterpolate'); | ||
var dirs; | ||
var dirname = __dirname; | ||
var rootDir = path.resolve('/'); | ||
@@ -35,3 +38,10 @@ this._tasks = []; | ||
// load core tasks | ||
dirs = glob.sync(__dirname + '/node_modules/autofile-*'); | ||
dirs = glob.sync(dirname + '/node_modules/autofile-*'); | ||
// find up autofile's directory because latest npm >=v4 have node_modules tree flattened | ||
while (dirname !== rootDir && dirs.length === 0) { | ||
dirname = path.resolve(dirname, '..'); | ||
dirs = glob.sync(dirname + '/autofile-*'); | ||
} | ||
dirs.forEach(function (dir) { | ||
@@ -38,0 +48,0 @@ var errors = this.loadTasks(dir, 'autofile.js'); |
{ | ||
"name": "automaton", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Task automation tool", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
"test": "mocha" | ||
}, | ||
@@ -9,0 +9,0 @@ "bugs": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195543
4812