Comments (4)
That's not bad already even if it has limitations. Thanks! Vulcan NPM is the priority here, for Vulcan Next you can focus on the local packages in the packages folder.
from vulcan-next.
@Timi-Duban it would be awesome to manage to handle point 2 (automatically generate documentation based on TS typings) for Vulcan NPM. The end result would be a documentation that shows the typings of all exported values for each package, so you can tell what you can import from each package and get the API.
from vulcan-next.
I found a module that handles this, it's called TypeDoc.
It's based on TS typing and provides a doc about everything that's exported (like classes, interfaces, types aliases, variables, functions...)
It seems to throw if typecheck throws, which can be a problem. For example I have a weird bug in packages/react-ui/components/form/tests/FormContainer.stories.tsx where typescript doesn't want to export buildUpdateQuery so I deleted it to test the documentation tool.
I don't think it's the perfect solution: it kinda feels like you're navigating in our types. But since it can be accessed more easily it can be usefull.
It looks like this:
Another problem: to have a pretty result, you have to give the command every index.ts file (or it will consider every folder as a module and you'll end up with repetitions). For example in vulcan-npm what seems the best way to use it to me is:
yarn add typedoc --dev -W
npx typedoc packages/core/index.ts packages/demo/index.ts packages/graphql/index.ts packages/i18n/index.ts packages/mdx/index.ts packages/meteor-legacy/index.ts packages/model/index.ts packages/mongo/index.ts packages/multi-env-demo/index.ts packages/permissions/index.ts packages/react-hooks/index.ts packages/react-ui/index.ts packages/schema/index.ts packages/utils/index.ts
The result is either HTML or JSON files, by default it's HTML located to /docs (but you can change it by doing npx typedoc --out [your new location] [files]
You can also add the flag --excludeNotDocumented
, but we don't have much of our functions commented so we lose a lot by doing this.
They have Monorepos handling, but it seems to crash in vulcan-npm. I'll try in vulcan-next and keep you informed.
from vulcan-next.
It's exactly the same in vulcan-next, but there are very few packages that are interesting (Apollo and Utils could be for example).
So for now the priority is to pass vulcan-npm typecheck to be able to automatically generate documentation !
from vulcan-next.
Related Issues (20)
- Give a shot at Cypress Mock SSR HOT 2
- Run on StackBlitz
- RFC: Windows support HOT 3
- Admin password not seeded as expected + send password reset email instead of verififcation HOT 1
- Use new tsconfigPath option
- Is there a way to write API schemas in Vulcan Next? HOT 4
- Provide a cache invalidation endpoint for static builds
- prisma & vulcan-next HOT 1
- Setup a pre-commit secret leak check
- React component scaffolding
- Implemented Apollo persisted queries
- Switch to Vite builder for storybook HOT 1
- Prefer tsup to ncc HOT 2
- VulcanForms v2 - random ideas & discussions HOT 1
- vulcan-next vs other fullstack react frameworks HOT 5
- Email templates
- Vulcan next & MERN HOT 2
- ObjectIds and Strings should both work with useUpdate and filters HOT 9
- Error when logging in: The "salt" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined HOT 1
- Is project active? HOT 1
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 vulcan-next.