Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for vendor prefixed nwb plugins
Browse files Browse the repository at this point in the history
ammmze committed Mar 15, 2018

Verified

This commit was signed with the committer’s verified signature.
mpfeil Matthias Pfeil
1 parent cbba39e commit f581304
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
@@ -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
@@ -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) || /^@[^/]+\/nwb-/.test(dep))
}

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

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 f581304

Please sign in to comment.