Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
--plugin
argument parsing (#682)
Currently, the `--plugin` argument simply doesn't work because it tries to treat the provided string as an array. For example, if I pass `--plugin foo`, it will try to load three npm packages named `f`, `o`, and `o` respectively. This commit changes the option declaration to use the `ParameterType.Array` type, which parses a comma-separated string into an array. It also removes the otherwise-unused `isArray` property from the `DeclarationOptions` interface.
- Loading branch information
1 parent
efe70aa
commit 921d996
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Application } from '..'; | ||
import Assert = require('assert'); | ||
|
||
describe('PluginHost', function () { | ||
it('parses plugins correctly', function () { | ||
let app = new Application({ | ||
plugin: 'typedoc-plugin-1,typedoc-plugin-2' | ||
}); | ||
|
||
Assert.deepEqual(app.plugins.plugins, [ | ||
'typedoc-plugin-1', | ||
'typedoc-plugin-2' | ||
]); | ||
}); | ||
}); |