@nativescript/hook
Advanced tools
Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1
@@ -23,3 +23,4 @@ module.exports = function (__dirname) { | ||
function generateHookName(pkg, hook) { | ||
return (hook.name || pkg.name) + '.js'; | ||
// flatten scoped packages to names | ||
return ((hook.name || pkg.name).replace(/@/ig, '').replace(/\//ig, '-')) + '.js'; | ||
} | ||
@@ -65,3 +66,2 @@ | ||
function forEachHook(pkgdir, callback) { | ||
console.log('forEachHook pkgdir:', pkgdir); | ||
var pkg = require(path.join(pkgdir, 'package.json')); | ||
@@ -74,3 +74,2 @@ var ns = pkg.nativescript; | ||
var projectDir = findProjectDir(pkgdir); | ||
console.log('forEachHook projectDir:', projectDir); | ||
if (!projectDir) { | ||
@@ -77,0 +76,0 @@ return; |
{ | ||
"name": "@nativescript/hook", | ||
"version": "1.0.0-alpha.0", | ||
"version": "1.0.0-alpha.1", | ||
"description": "Helper module for installing hooks into NativeScript projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
20401
108