Skip to content

Commit 6908f2f

Browse files
authored
Merge pull request #6 from wlucha/commitlint
Add commit linting & pre-commit formatting
2 parents bc07d11 + 45077b9 commit 6908f2f

File tree

6 files changed

+1032
-20
lines changed

6 files changed

+1032
-20
lines changed

.husky/commit-msg

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1" --quiet ||
5+
(
6+
echo -e "\n❌ Please check commit message format! \n"
7+
false;
8+
)
9+
10+
echo -e "✅ Commit message format correct! \n"

.husky/pre-commit

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged --quiet ||
5+
(
6+
echo -e "\n❌ Prettier formatting failed!\n"
7+
false;
8+
)
9+
10+
echo -e "✅ Prettier formatting successful!"

README.md

+28-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
[![default](https://user-images.githubusercontent.com/7531596/81993396-d5142b00-9645-11ea-995f-98342b7d5c8f.png)](https://github.com/wlucha/angular-starter)
1+
[![default](https://user-images.githubusercontent.com/7531596/81993396-d5142b00-9645-11ea-995f-98342b7d5c8f.png)](https://github.com/wlucha/angular-starter)
2+
23
# Angular 12 + ESLint + Material + Transloco + Jest + Compodoc + Docker
3-
Angular 12 Starter with Material, Transloco, Jest, Compodoc, Docker Support, ESLint & Prettier
44

5+
Angular 12 Starter with Material, Transloco, Jest, Compodoc, Docker Support, ESLint & Prettier
56

67
![Angular12](https://img.shields.io/badge/Angular-12-brightgreen)
78
[![Build](https://api.travis-ci.org/wlucha/angular-starter.svg?branch=master)](https://travis-ci.org/github/wlucha/angular-starter)
@@ -15,22 +16,26 @@ Angular 12 Starter with Material, Transloco, Jest, Compodoc, Docker Support, ESL
1516
[![dependency Status](https://david-dm.org/wlucha/angular-starter.svg)](https://david-dm.org/wlucha/angular-starter#info=dependencies)
1617
[![devDependency Status](https://david-dm.org/wlucha/angular-starter/dev-status.svg)](https://david-dm.org/wlucha/angular-starter#info=devDependencies)
1718
-->
18-
19-
## Features
20-
[Angular 12](https://angular.io/)
21-
[Angular Material](https://material.angular.io/)
19+
20+
## Features
21+
22+
[Angular 12](https://angular.io/)
23+
[Angular Material](https://material.angular.io/)
2224
[Jest Unit Testing](https://jestjs.io/)
2325
✅ Internationalization with [Transloco](https://github.com/ngneat/transloco)
24-
✅ Auto documentation with [Compodoc](https://compodoc.app/)
26+
✅ Auto documentation with [Compodoc](https://compodoc.app/)
2527
✅ Analyse your project with [webpack-bundle-analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer)
2628
[Docker](https://www.docker.com/)
2729
[ESLint](https://eslint.org/)
28-
[Prettier](https://prettier.io/)
30+
[Prettier](https://prettier.io/)
31+
[Commit Linting](https://github.com/conventional-changelog/commitlint)
2932

3033
## Deploy
34+
3135
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
3236

3337
## Demo
38+
3439
[![StackBlitz Demo](https://user-images.githubusercontent.com/7531596/83507657-2424e180-a4c9-11ea-8e4f-b3f8e7d6b4c5.png)](https://stackblitz.com/github/wlucha/angular-starter)
3540

3641
## Install / Development
@@ -50,30 +55,34 @@ $ npm run start
5055
```
5156

5257
## Docker Deployment
58+
5359
```bash
5460
# Build Docker image
55-
$ docker build . -t angular-starter
61+
$ docker build . -t angular-starter
5662

5763
# Run Docker Container
5864
$ docker run -p 3000:80 angular-starter
5965
```
6066

6167
## Docker Hub
68+
6269
https://hub.docker.com/r/wlucha/angular-starter
6370

6471
## Commands
65-
- `npm run start` - start the app
66-
- `npm run lint` - lint the project
67-
- `npm run test` - run unit tests
68-
- `npm run build` - build the project
69-
- `npm run build:prod` - build the project in production mode
70-
- `npm run build:prod:stats` - build the project in product mode with stats
71-
- `npm run analyse` - analyse bundle with [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)
72-
- `npm run compodoc` - generate [compodoc](https://github.com/compodoc/compodoc) documentation
73-
- `npm run changelog` - generate changelog
74-
- `npm run prettier` - format the whole project
72+
73+
- `npm run start` - start the app
74+
- `npm run lint` - lint the project
75+
- `npm run test` - run unit tests
76+
- `npm run build` - build the project
77+
- `npm run build:prod` - build the project in production mode
78+
- `npm run build:prod:stats` - build the project in product mode with stats
79+
- `npm run analyse` - analyse bundle with [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)
80+
- `npm run compodoc` - generate [compodoc](https://github.com/compodoc/compodoc) documentation
81+
- `npm run changelog` - generate changelog
82+
- `npm run prettier` - format the whole project
7583

7684
## License
85+
7786
MIT License
7887

7988
Copyright (c) 2021 Wilfried Lucha

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

0 commit comments

Comments
 (0)