This is a boiler project Snowpack with Tailwind for styling and the option to use autopublish to Github pages using actions. Based on this repo, and my parcel build with some best practice implementation from the H5BP organisation.
Press the Use This Template
button, or Clone the repo and run
npm install
To enable prettier on commit using husky
npm run install:husky
There is a few scripts in package.json, but most of them are run by the npm-run-all plugin. Only use the following
To run the dev server
npm run start
To build the files
npm run build
If you want to opt out on autopublish to github pages, remove the .github directory.
To set up the autopublish
- Update the value of
homepage
inpackage.json
. It should look likehttps://<your-username>.github.io/<your-repo-name>
(no trailing slash). - Push your changes into a new GitHub repository.
- You should see an Action running on
https://github.com/<your-username>/<repo-name>/actions
- Make sure to enable GitHub pages for your repo and select the
gh-pages
branch - Give GH Pages some minutes, your site should be live on
https://<your-username>.github.io/<your-repo-name>
Tailwind is in JIT mode, and the css will be purged. It is fine if the index.css is empty, it will be populated when running or building, as well as whenever you add a new Tailwind class.
You can find some great server configs from the H5BP organization if wanted.
I have just started to use a front end checklist myself, a lot of useful information here.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.