Installation
This project can be loaded in a couple of ways
CDN (Recommended)
This will allow you to use all components with ease in any
project if you include this in the head of the HTML. It can be
included after the body but this can result in flashes on load,
as unknown components will be rendered as if they were plain
text by your browser.
It would be recommended to include a version number, so as it
avoid any risk of breaking changes in the future.
NPM install
If you want to bundle the components in with your own code then
you can download the deliverable from NPM. It is a standalone
module with dependencies bundled in so this will not improve
your deliverable size.
npm install @ipheion/bakery
Build from source
If you want to make updates or bundle the components within your
own app, whilst allowing for tree shaking and optimisations
during minimisation, you could build from source.
Deno
is required by this project so make sure you have that installed
first.
git clone https://github.com/PaulPopat/bakery.git cd bakery deno
task install deno task build
The project uses a framework called
Wholemeal
in order to compile the components. Currently, wholemeal
contains no methods for including none component code, however
adding a standard TypeScript file to the "templates" part of the
project json should compile as a workaround.
While this may work, I do not recommend it as the component
library is rather clever about asynchronously loading in content
that is from large external libraries and the extra work will
probably not result in better performance.
A better method would be to include the CDN link for this in
your head tag and then including your behaviour elsewhere.