Skip to content

Commit

Permalink
support for vendor prefixed nwb plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ammmze committed Mar 17, 2018
1 parent cbba39e commit 85b95da
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/coverage
/lib
/node_modules
/.idea
npm-debug.log*
package-lock.json
2 changes: 1 addition & 1 deletion src/config/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function getPackagePlugins(cwd) {
return [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.devDependencies || {}),
].filter(dep => /^nwb-/.test(dep))
].filter(dep => /^(@[^/]+\/)?nwb-/.test(dep))
}

/**
Expand Down
4 changes: 4 additions & 0 deletions tests/config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ describe('getPluginConfig()', () => {
fake: {
loader: 'path/to/fake.js',
test: /\.fake$/,
},
fakeVendor: {
loader: 'path/to/fake.js',
test: /\.fake$/,
}
}
})
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/fixtures/plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"devDependencies": {
"nwb-testplugin": "*"
"nwb-testplugin": "*",
"@vendor/nwb-testplugin": "*"
}
}

0 comments on commit 85b95da

Please sign in to comment.