Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

A Snowpack with Tailwind boiler project.

License

Notifications You must be signed in to change notification settings

Bcdo/snowpack-tailwind-boiler

Repository files navigation

Snowpack-Tailwind-boiler

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.

Usage

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

  1. Update the value of homepage in package.json. It should look like https://<your-username>.github.io/<your-repo-name> (no trailing slash).
  2. Push your changes into a new GitHub repository.
  3. You should see an Action running on https://github.com/<your-username>/<repo-name>/actions
  4. Make sure to enable GitHub pages for your repo and select the gh-pages branch
  5. Give GH Pages some minutes, your site should be live on https://<your-username>.github.io/<your-repo-name>

Extra info

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.

Contributing

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.

License

MIT