A starter template for building modern JavaScript applications using Webpack, with integrated Jest for testing and ESLint for code quality assurance.
- Ensure you have the following installed:
- Create a new repository using the Use this template botton on the top right corner of this page and clone it locally.
- install the dependencies with
npm install
- Start the Development server:
Use the command
npm run dev
to start webpack dev server. - Run Tests:
Write your tests in the
test/
folder and run them with the commandnpm test
. - Build for Production:
Generate a production-ready version of your application in the
dist/
folder by running the commandnpm build
.
- Create a new branch with
git branch gh-pages
(First time only). - Run
git checkout gh-pages
to switch branch - Run
git merge main --no-edit
to merge the latest changes from themain
branch. - Build the distribution files in the
dist/
folder with the commandnpm build
. - Remove
dist/
from your.gitignore
file (if listed), than stage and commit the changes withgit add dist/
andcommit -m "Prepare dist for deployment"
. - Run the command
npm deploy
to deploy on github pages. - Now you can go back to main with
git checkout main
.