Awesome
Learning snowpack
Just one of the things I'm learning. https://github.com/hchiam/learning
Only build a file once, and only rebuild it if it changes, instead of rebuilding on every change and going through the dependency graph - this means build times don't increase with your project size; sounds like the future of web dev (compared to webpack, parcel, and rollup).
Click to expand:
<details> <summary>New notes</summary>New notes:
From scratch: create a folder, set up package.json with "start": "snowpack dev"
, and create index.html. Then run these CLI commands:
npm init
yarn add --dev snowpack
yarn start
Using this repo:
cd new
yarn
yarn start
If you're using purely npm
and not yarn
, you can easily figure out the equivalent npm
commands: https://github.com/hchiam/learning-yarn
Old notes:
You can generate a dependency graph with bash show_dep_graph.sh
.
Learning Resources
https://dev.to/snowleo208/my-first-experience-of-using-snowpack-a-new-way-of-building-js-2jb
https://www.youtube.com/watch?v=pUUAil_9yIw
https://www.snowpack.dev/#quick-start
https://www.youtube.com/watch?v=zjhP1zSj5oo
https://www.youtube.com/watch?v=5IG4UmULyoA
Or just
npx snowpack-init my-app; cd my-app; npm run start
# (watch for any option prompts that you need to respond to)
Or use CSA
Svelte template: https://github.com/pikapkg/create-snowpack-app/tree/master/templates/app-template-svelte
npx create-snowpack-app new-dir --template @snowpack/app-template-svelte --use-yarn
(Note to self: the steps after didn't seem to work for me when I last tried.)
</details>