Introduction
This bundle-cli template allows static documentation for components from markdown documents
Steps
1. See pkg.scripts
npm start
bundle src/**/*.md docs --watch --server --template template/template.htmlThis script allows you to create a livereload mode server that serves markdown files
Where :
src/**/*.md: expression for fast-glob, this will import all the files that comply with the expression.--watch: It allows to observe the changes of the files associated to the expression, existing or to exist.--server: Create a server by combining with the--watchflag enables livereload mode of the server.--template template/template.html: allows to append the use of a superior template to nest the associated markdown files.
Console output example
server running on http://localhost:8000 # destination directory server
bundle: 15ms # bundle creation duration
npm run build:docsThis script allows you to run the build for production of thenpm startscript.
npm build:components
bundle src/components/**/*-*.js ./ --minify --externalThis script allows you to export the associated web-components
Where :
src/components/**/*-*.js: look for files that match the expression, egsrc/components/my-header/my-header.js.--minify: Minify css and js code--external: Lets considerpkg.dependenciesas external dependencies.