GitHub - waldronmatt/webpack-boilerplate: Webpack 5 Boilerplate with TypeScript,...
source link: https://github.com/waldronmatt/webpack-boilerplate
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Webpack Boilerplate
Comprehensive Webpack 5 Boilerplate with TypeScript
, Sass
, Jest
, Browserslist
, PostCSS
, Eslint
, Stylelint
, HTMLHint
, Markdownlint
, Secretlint
, YAMLint
, Actionlint
, Prettier
, Husky
, Lint-Staged
, Commitizen
, Commitlint
, Semantic-Release
.
Features
- Mixed
js
/ts
boilerplate withJest
andEslint
,Stylelint
, andPrettier
linting - Conventional Commits prompt and commit linting using
Commitizen
andCommitlint
Husky
hooks to lint and test staged files usingLint-Staged
- Server and serverless builds with
Netlify
andExpress
- Automated releases using
Semantic-Release
- Uses my shareable configs to reduce boilerplate
- ~100% Lighthouse Score
Installation
Install dependencies:
yarn
Install hooks:
yarn prepare
Install make
:
[your-package-manager] install make
Install yamllint
and actionlint
.
Getting Started
Run dev environment:
yarn dev
Build and serve for Netlify:
yarn build
Note: Configure script in Netlify to auto-run via push to main
branch.
Build for Express:
yarn prod
Serve for Express:
yarn serve
Commands
Commit changes using conventional changelog:
yarn commit
Lint all .js
, .jsx
, .ts
, .tsx
, .css
, .scss
, .html
, .md
files:
yarn lint
Note: release.yml
will run this before versioning and publishing.
Lint .yml
files:
make -f MAKEFILE
Run all tests:
yarn test
Note: release.yml
will run this before versioning and publishing.
Click and Go!
- Click
Use this template
to create your own copy - Clone down the newly created repository
- Run
yarn
andyarn prepare
to install dependencies and git hooks - Update your
package.json
- Delete
CHANGELOG.md
- Customize your repo and commit changes using the
commit
script inpackage.json
- Use a commit type like
feat
- Push out your changes. This will trigger a release with a version of
1.0.0
License
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK