Giter Site home page Giter Site logo

Comments (4)

twittwer avatar twittwer commented on June 18, 2024 1

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.

eulersson avatar eulersson commented on June 18, 2024

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.

twittwer avatar twittwer commented on June 18, 2024

@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.

eulersson avatar eulersson commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.