Building your docmap

To build your docmap, the easiest wait is to use the sugar CLI like so:

Make sure to launch this command in your project root directory.

Sources

The docmap builder will search for all your project dependencies that have themselves a docmap.json file at their root, and it will search inside your project for files that have 1 or more docblock(s) with a @namespace ... tag. This @namespace tag is required as the builder uses it to store the item under the good namespace.

As you may doubt, the builder will not take a look inside the node_modules directory to search for files with the @namespace tag. This would be way to slow and not requested. In fact, the builder will take a look in your files using these glob patterns:

  • *

  • src/!(css)/*{0,4}/*.+(txt|htm|html|md|json|csv|rss|xhtml|asp|c|cgi|cfm|pl|class|cpp|cs|h|java|php|py|sh|swift|vb|js|jsp|jsx|css|ts|tsx|rs|dart|twig)

  • dist/+(css)/*

Here's are the excluded folders:

  • **/__tests__/**/*

  • **/__tests__.wip/**/*

  • **/__wip__/**/*

If you need to update or add some globs to search in, simply create a file under .sugar/docmap.config.ts and fill it like so:

Output

By default, the build command will generate a docmap.json file in your project root folder. We recommend you to keep this like that but if you want to update the output location, you can do so by updating the config.docmap.build.outPath configuration.

Bugs
are not our friends...

Don't hesitate to declare an issue if something does not works as expected.

Declare my issue on Github Talk about it on Discord

The more we are,
the stronger we become.

Don't hesitate to tell some words to you friends about us. The goal is to became more and more each days to help each others...

Support us on Patreon! Share on Facebook! Make a tweet!

The more we are,
the stronger we become.

Don't be afraid to join us on Discord.

Join us on discord!

We love,
Open source!

All of our codebase can be found on Github. We hope that you may contribute to help us make our tools even better!

Discover our codebase!

Welcome on