The overview is simple:
why-more build
or why-more dev
and every svelte component in
the top level of the src
folder of your project is turned into a page in a dist
folderThats the whole process. No multiple steps. No config files. Two dependencies.
Make your project folder
npm init
npm i --save why-more svelte
"build": "why-more build [your_input_folder] [your_output_folder]"
in your package.json
scripts section"dev": "why-more dev [your_input_folder] [your_output_folder]"
in your package.json
scripts sectionnpm run dev
or npm run build
in your projectIts good enough for the build
subcommand, the dev
subcommand is something I'll be making later.
Why-More is just a cli(not global, make sure youre using script or npx) that builds svelte components, and provides a preview for them.
This is not intended to build websites, or pages that link into eachother. The use case is very quick simple tooling and documentation.
Imagine a file format for interactive documentation and tools that is completely self contained, runs on every platform with only one dependency that every OS has, totals about 200kb on the heavy end of use, and sub 100ms build times.
Compiling a single svelte component into a self contained html file fulfills all that. Simply import your css, images, svelte components and there is nothing between you and writing the most universal tooling.