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.html
This 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--watch
flag 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:docs
This script allows you to run the build for production of thenpm start
script.
npm build:components
bundle src/components/**/*-*.js ./ --minify --external
This 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.dependencies
as external dependencies.