I often find myself setting up a website project, and all the configuration that goes with it. This set up task can be fairly repetitive, so I took some of the basic features I almost always start with, and made this project.
The project does have a couple “extra” features beyond an absolute basic website. Sometimes I want to just build a set of files I can host somewhere, other times I want to just deploy a Docker image to a cloud service.
For a build system, I’m using npm from NodeJS. For site packaging, I’m using webpack, which also provides a development server with live reload.
The repository is here: https://github.com/d4lton/jools. The name is a play on Jewels, which is a simple game I’ve been working on.
It doesn’t include a UI framework or CSS preprocessor, because those tend to go hand-in-hand, and I didn’t want to predetermine which framework I might want to use (if any).
It also isn’t set up for Typescript, even though I tend to use Typescript these days. I may create a Typescript version of this project, but converting to Typescript is fairly simple. I chose to keep this starter project as basic as I could.
The README.md should have enough instruction to get going. Follow the instructions under INSTALLING and RUNNING.
The structure of the project is hopefully easy to understand:
static: This directory (and any sub-directories) are where your HTML and CSS files should be. The
config: This directory contains the configuration JSON file(s). Right now there is just the
config.development.jsonfile for local development. Also, it is basically empty. However, any properties you set in here will be “injected” into the static website and be available in the
process.envobject. For the curious, this is intended to mirror how environment variables are made available in a server-side NodeJS project.
Hopefully this project helps you in some way! Good luck!