5

GitHub - waldronmatt/webpack-boilerplate: Webpack 5 Boilerplate with TypeScript,...

 1 year ago
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.
neoserver,ios ssh client

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 with Jest and Eslint, Stylelint, and Prettier linting
  • Conventional Commits prompt and commit linting using Commitizen and Commitlint
  • Husky hooks to lint and test staged files using Lint-Staged
  • Server and serverless builds with Netlify and Express
  • 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!

  1. Click Use this template to create your own copy
  2. Clone down the newly created repository
  3. Run yarn and yarn prepare to install dependencies and git hooks
  4. Update your package.json
  5. Delete CHANGELOG.md
  6. Customize your repo and commit changes using the commit script in package.json
  7. Use a commit type like feat
  8. Push out your changes. This will trigger a release with a version of 1.0.0

License


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK