intelli-espower-loader
Advanced tools
Comparing version 0.1.0 to 0.2.0
"use strict"; | ||
var fs = require("fs"); | ||
var assert = require("assert"); | ||
var fs = require("fs"); | ||
var pather = require("path"); | ||
var normalizeDir = require("./lib/normalize-dir"); | ||
var packageName = require("./package.json").name; | ||
@@ -24,9 +25,13 @@ | ||
} | ||
var directories = getPackageJSON().directories; | ||
assert.equal(typeof directories, "object", 'You should setting `directories : { test : "test/" }`'); | ||
assert.equal(typeof directories.test, "string", 'You should setting `directories : { test : "test/" }`'); | ||
var testDirectory = directories.test; | ||
function getTestDirFromPkg(pkg) { | ||
var directories = pkg.directories; | ||
assert.equal(typeof directories, "object", 'You should setting `directories : { test : "test/" }`'); | ||
assert.equal(typeof directories.test, "string", 'You should setting `directories : { test : "test/" }`'); | ||
return directories.test; | ||
} | ||
var pkg = getPackageJSON(); | ||
var testDirectory = getTestDirFromPkg(pkg); | ||
require('espower-loader')({ | ||
cwd: process.cwd(), | ||
pattern: testDirectory + "**" + pather.sep + "*.js" | ||
pattern: normalizeDir(testDirectory) + "**" + pather.sep + "*.js" | ||
}); |
{ | ||
"name": "intelli-espower-loader", | ||
"description": "Make espower-lodaer config file unnecessary.", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"repository": { | ||
@@ -22,3 +22,6 @@ "url": "git://github.com/azu/intelli-espower-loader.git" | ||
"espower-loader": "~0.7.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^1.20.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
29435
16
64
1