Closed koolc closed 1 year ago
Ok thanks. Will have a look at that.
I think the preferable thing here would be to do:
package.json
"start": "TYPEDOC_WATCH=true vuepress dev docs",
"build": "TYPEDOC_WATCH=false vuepress build docs",
config.js
plugins: [
typedocPlugin({
....
watch: process.env.TYPEDOC_WATCH,
}),
],```
But ,running the code below, the value is string "false"
, not boolean value.
if (typedocOptions.watch) {
app.convertAndWatch(async (project) => {
app.generateDocs(project, outputDirectory);
});
}
So, having to use "boolean" ==="true"
to fix the condition in vuepress.config.js
file:
plugins: [
typedocPlugin({
....
watch: process.env.TYPEDOC_WATCH === 'true', // the fix
}),
],```
The VuePress env flag
should
be supplied to auto bootstrap watch ability. Sometimes, user doesn't configure thetypedocOptions.watch
the option, and use a singlevuepress.config.ts
config file to supportvuepress dev
andvuepress build
.→