Somepub / minimal-web_template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minimal-web_boilerplate

const { ❤️ } = BOILERPLATE(ESBUILD + ESTRALLA + CADDY + SCSS + PREACT)

How to run?

What is this?

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.

Dependencies installed

Dependencies used for

  • 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

DevServer

This template uses Caddy as a DevServer

To write devServer config and proxies:: edit - Caddyfile

Pros

  • 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

Cons

  • 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

What does "build.js" do?

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

Known Issues

About

License:MIT License


Languages

Language:JavaScript 73.9%Language:TypeScript 24.2%Language:SCSS 2.0%