Vincent Ogloblinsky
Software architect
" Frontend technologies "
@vogloblinsky
Angular trainer
and
also HTML5, JavaScript, TypeScript
Speaker
French meetups and conferences
Let me tell you a story
David
Pascal
Richard
Once upon a time...
3 guys from one startup team had to build a great application using Angular
David
Pascal
Richard
Their
missions
Pascal starts the architecture using Angular CLI
He also starts several views of the application in many "views" components
The timeline
David adds after few Angular services in ./shared/services folder
Richard adds the first shared components in ./shared/components folder
Hey Pascal, where are the views which will use my services ?
the first team interaction appears
Watch the ./src/views
folder bro
Hey Richard, which component handle the customer wizard ?
Second team interaction
It is the WizardComponent
in the file
./shared/components/wizard.ts
Pascal who is a meticulous guy
starts searching a documentation tool
for their project on the web
and found something interesting in the first search results
Humm...
Feels nice and solid, let's have a look
> npm i --save-dev @compodoc/compodoc
...
compodoc -p src/tsconfig.json -s -w
...
Hey Pascal, what is the input for the final processing view component ?
and another team interaction appears
Watch the documentation bro ;)
Story conclusion
" Smart tools give smart developers "
French proverb
A low-effort approach of documentation, always up-to-date, inspired by Domain-Driven Design "
now, let's have a deep look
(if available at the root of the project)
General infos
Source code
General infos (metadata, methods, properties, ...)
Source code
Link between general view and source code
Template view
DOM Tree with link to internal components
Global variables, types, functions etc
Routes with modules, lazy-loaded and link to targeted component
Get a clean and quick overview of documentation coverage in your project
Extend generated documentation with additional markdown files
Use one of the supplied themes that you like
Search engine available for all scanned files
4 JSDoc tags supported
/**
* This is a great function
*
* @example
* processTarget('yo')
*
* @param {string} target The target to process see {@link Todo}
* @returns The processed target number
*/
compodoc -p src/tsconfig.json
compodoc -p src/tsconfig.json -s
compodoc -p src/tsconfig.json -s -w
Modules graph (@compodoc/ngd from @manekinekko) using vis.js
Support of more general TypeScript/ES6 syntax
@flow : bottom slide
...
The idea is to generate a graph of the flow of the data for one user experience scenario (ex: account creation)
WizardComponentPart1
WizardComponentPart2