Skip to content

Commit

Permalink
Add support for scoped npm modules (https://www.npmjs.com/enterprise#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Herrera committed Feb 23, 2015
1 parent eacea8e commit 746ee20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/slush.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ function getModulesPaths () {

function findGenerators (searchpaths) {
return searchpaths.reduce(function (arr, searchpath) {
return arr.concat(glob.sync('slush-*', {cwd: searchpath, stat: true}).map(function (match) {
var generator = {path: path.join(searchpath, match), name: match.slice(6), pkg: {}};
return arr.concat(glob.sync('{@*/,}slush-*', {cwd: searchpath, stat: true}).map(function (match) {
var generator = {path: path.join(searchpath, match), name: match.replace(/(?:@[\w]+[\/|\\]+)?slush-/, ""), pkg: {}};
try {
generator.pkg = require(path.join(searchpath, match, 'package.json'));
} catch (e) {
Expand Down

0 comments on commit 746ee20

Please sign in to comment.