const { ❤️ } = BOILERPLATE(ESBUILD + ESTRALLA + CADDY + SCSS + PREACT)
- Install Caddy [https://caddyserver.com/docs/install]
- Install npm packages (npm i || yarn)
- yarn start
This is a web_development environment template. (BOILERPLATE) Usually, people use Webpack, Rollup, or Parcel to develop with WEB. I'm not a big fan of those, and there is always an alternative.
- estrella (esbuild) [https://github.com/rsms/estrella] [https://github.com/evanw/esbuild]
- @es-pack/esbuild-sass-plugin [https://github.com/Csszabi98/es-pack/tree/main/plugins/esbuild-sass-plugin]
- livereload [https://github.com/napcs/node-livereload]
- preact [https://preactjs.com/guide/v10/getting-started]
- Caddy [https://caddyserver.com/docs/]
- estrella: Used as a bundler, that can watch source files and make changes to outDir.
- @es-pack/esbuild-sass-plugin: A esbuild plugin, that compiles sccs files to css
- livereload: Livereload code
- Preact: React alternative (Much smaller)
- Caddy: DevServer
This template uses Caddy as a DevServer
To write devServer config and proxies:: edit - Caddyfile
- Bundler is x10 faster than Webpack, Rollup, or Parcel (Any bundler made with JS)
- Bundler uses minimal dependencies
- Easier to write bundle conf
- Caddy is more extensible and performant than webpack DevServer or rollup plugin serve
- Preact has a smaller lib size than React
- Bundler is fairly new, which means there could be issues that you can't find the right answer in GitHub or StackOverflow
- Bundler doesn't have a wide range of plugins (Like systemJS, which may be coming soon?)
- Minimal docs @ esbuild && estrella
- Caddy setup and install is not "out of the box"
- Preact doesn't support everything
Build.js does the following:
- Bundle index.tsx file with esbuild
- Watch files with estrella
- Clear and make dist directory
- Execute extra logic for css and scss watch
- Generate HTML