Comments (4)
The latest update (v1.6.4 🎉) should solve your issue.
During the testing of version 1.6.0 I discovered the cause of your problem. Compodoc's internal watcher cannot handle the includes of the workspaceDocs correctly, as the calculation of the highest common directory seems to fail.
Before 1.6.4 only the watch mode with json export was handled by the nodemon wrapper, now this wrapper is depending on the workspaceDocs setting to work around your issue for the moment.
from nx-tools.
Thanks for your change @twittwer. I can see it works now if I edit the .ts
files but not if I edit the README.md
for each individual project of an Nx
monorepo.
Prepare Compodoc...
{
disableCoverage: false,
tsConfig: 'libs/tools/tsconfig.compodoc.json',
outputPath: 'dist/compodoc/tools',
workspaceDocs: true,
assetsFolder: 'docs/',
serve: true,
watch: true,
silent: false,
port: 8080,
debug: true,
exportFormat: 'html',
disableSourceCode: false,
disableDomTree: false,
disableTemplateTab: false,
disableStyleTab: false,
disableGraph: false,
disablePrivate: true,
disableProtected: false,
disableInternal: true,
disableLifeCycleHooks: true,
disableRoutesGraph: false,
disableSearch: false,
disableDependencies: false,
language: 'en-US',
theme: 'gitbook',
hideGenerator: false
}
Spawn Compodoc in nodemon... {
command: 'yarn nodemon',
arguments: [
'--ignore dist',
'--ext ts',
'--exec "node_modules/.bin/compodoc --tsconfig="libs/tools/tsconfig.compodoc.json" --output="dist/compodoc/tools" --exportFormat="html" --name="watchity" --includes="../../../../var/folders/l4/dq9gl2r55gz1jxm0b5k0sppw0000gn/T/compodoc-includes-Bv4Xuy" --includesName="Projects" --assetsFolder="docs" --disablePrivate --disableInternal --disableLifeCycleHooks --language="en-US" --theme="gitbook" --serve --port="8080""'
],
options: { cwd: '/Users/ramon/Watchity/frontend', shell: true }
}
$ /Users/ramon/Watchity/frontend/node_modules/.bin/nodemon --ignore dist --ext ts --exec 'node_modules/.bin/compodoc --tsconfig=libs/tools/tsconfig.compodoc.json --output=dist/compodoc/tools --exportFormat=html --name=watchity --includes=../../../../var/folders/l4/dq9gl2r55gz1jxm0b5k0sppw0000gn/T/compodoc-includes-Bv4Xuy --includesName=Projects --assetsFolder=docs --disablePrivate --disableInternal --disableLifeCycleHooks --language=en-US --theme=gitbook --serve --port=8080'
[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts
[nodemon] starting `node_modules/.bin/compodoc --tsconfig=libs/tools/tsconfig.compodoc.json --output=dist/compodoc/tools --exportFormat=html --name=watchity --includes=../../../../var/folders/l4/dq9gl2r55gz1jxm0b5k0sppw0000gn/T/compodoc-includes-Bv4Xuy --includesName=Projects --assetsFolder=docs --disablePrivate --disableInternal --disableLifeCycleHooks --language=en-US --theme=gitbook --serve --port=8080`
1.1.19
I can see the [nodemon] watching extensions: ts
.
In your code I can see the nodemon process that it is spawned has the .ts
extension filter.
if (options.watch && options.workspaceDocs) {
const _cmd = `${getPackageManagerCommand().exec} nodemon`;
const _cmdArgs = [
'--ignore dist',
'--ext ts',
`--exec "${cmd} ${cmdArgs
.filter((arg) => !arg.startsWith('--watch'))
.join(' ')}"`,
];
Is this done on purpose? Would it make sense to --ext the .md
files too?
Thank you.
from nx-tools.
@docwhite Do you want to rerun compodoc on .md file changes in general or the project readmes which are listed under the Projects menu?
And could you provide a use case for this?
from nx-tools.
Well, either way it would be fine.
Imagine if you are writing on the root README.md or any other project's README.md (e.g. libs/my-lib/README.md), if you want to see how—for instance—a markdown table looks like as you are writing it to make sure you don't break the table syntax then it would come handy, to iteratively see actual HTML results instead of believing the MarkDown file you are writing is valid.
Many times I had broken tables because of the MarkDown table syntax.
Now with your tool I have to kill the process and re-run it and it compiles so many files again.
from nx-tools.
Related Issues (20)
- Npm package @twittwer/compodoc not found HOT 2
- Unhandled Rejection HOT 5
- Not able to `nx add @twittwer/compodoc` HOT 1
- compdoc nx plugin: support nx per-project configuration HOT 7
- Use Compodoc watch json mode HOT 2
- Is there a way to just document the libraries? HOT 2
- No longer adds `'compodoc'` target to `cacheableOperations` HOT 2
- [Bug] Nx + Angular (v13): tsconfig path error HOT 3
- Do not use package manager bin to execute compodoc HOT 1
- Cache not reverted when not setting output path options HOT 4
- Error during /***/***/my-project/libs/shared/ui/package.json read HOT 1
- Add some doc for developer participation (have issues) HOT 1
- error on storybook-watch with windows HOT 1
- Support for nx 14 HOT 2
- Workspace docs & unit test coverage HOT 4
- Code documentation coverage not available HOT 2
- Cannot find module 'nx/src/generators/utils/json' HOT 2
- migrate to nx 16 HOT 1
- [Bug] Package "@twittwer/compodoc" was found but does not support schematics HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-tools.