https://calculadorahepa.netlify.app/
The CADR calculator that helps you to choose the right air purifier.
This project uses Svelte.
- It comes with TailwindCSS already baked in (The very awesome Tailwind docs).
- Uses svelte-preprocess to preprocess Tailwind classes used in
<style>
tags with@apply
. - Uses @rollup/plugin-node-resolve to resolve Svelte files even with
.svelte
extension left off of import. - Uses
rollup-plugin-alias
to alias thesrc
directory to@
in order to make deeply nested local imports cleaner.
Install the dependencies...
cd calculadorahepa && yarn
...then start Rollup:
yarn dev
Navigate to localhost:5000.
LiveReload is enabled so when you edit a component file in src
and save it the browser will reload the page to see your changes.
To build an optimised version of the app:
yarn build
You can run the newly built app with yarn start
. This uses sirv, which is included in the package.json's dependencies
so that the app will work when it is deployed to platforms like Heroku.
By default, sirv will only respond to requests that match files in public
. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for any path. You can make it so by editing the "start"
command in package.json:
"start": "sirv public --single"
With assistance from the following:
How to configure Tailwind in a svelte project? link
Erroneous errors with tailwind-style @ rules link
Import Svelte component ommiting .svelte extension link