Skip to content

Commit b75fdca

Browse files
committed
Merge branch 'release/v3.0.0'
2 parents 8aa41c9 + 0bc7f7d commit b75fdca

File tree

112 files changed

+9465
-44042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+9465
-44042
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules/*
22
package.json
33
package-lock.json
44
yarn.lock
5+
pnpm-lock.yaml
56
dist

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ speed-measure-plugin*.json
3232
.history/*
3333

3434
# misc
35+
/.angular/cache
3536
/.sass-cache
3637
/connect.lock
3738
/coverage

.husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx commitlint --edit $1
4+
# npx commitlint --edit $1

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn test:unit
4+
# npm run test:unit

.vscode/settings.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
"[json]": {
1212
"editor.defaultFormatter": "esbenp.prettier-vscode"
1313
},
14-
"css.validate": false,
15-
"scss.validate": false
14+
"css.validate": false
1615
}

CONTRIBUTING.md

-57
This file was deleted.

README.md

+14-121
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@
2020
<br>
2121
<br>
2222
</p>
23-
24-
<p align="center">
25-
<a href="https://github.com/facebook/jest">
26-
<img src="https://jestjs.io/img/jest-badge.svg" alt="unit tests with Jest" />
27-
</a>&nbsp;
28-
<a href="https://github.com/juanmesa2097/angular-boilerplate/issues">
29-
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="Contributions welcome" />
30-
</a>
31-
</p>
32-
3323
<hr>
3424

3525
## ⚗️ Features
@@ -41,27 +31,17 @@
4131
- Self-contained components and encapsulated modules.
4232
- Components types (e.g. component, page).
4333
- Amazing directory structure.
44-
- Unit tests with Jest instead of Karma & Jasmine.
45-
- e2e tests with Cypress (removed in favor of the official [cypress schematic](https://github.com/cypress-io/cypress/tree/develop/npm/cypress-schematic) as an opt-in feature)
4634
- PWA
4735
- Dynamic titles and content meta tags.
48-
- TailwindCSS + Autoprefixer + PurgeCSS setup.
36+
- TailwindCSS.
4937
- Dark mode and theme configuration.
5038
- Scalable CSS architecture in favor of TailwindCSS layers.
5139
- [Lighthouse](https://developers.google.com/web/tools/lighthouse) reports improved.
52-
- Migration from TSLint to ESLint.
53-
- Run unit tests & lint code on Git Hooks using [Husky](https://github.com/typicode/husky) & validate commit messages using [commitlint](https://github.com/conventional-changelog/commitlint)
54-
- GitHub Actions workflows for code analysis and unit tests.
40+
- ESLint.
41+
- Run unit tests & lint code using [Husky](https://github.com/typicode/husky) & validate commit messages using [commitlint](https://github.com/conventional-changelog/commitlint)
5542

5643
## 📄 Pages
5744

58-
```
59-
Types of pages
60-
61-
public: everybody can see them
62-
private: only logged in users can see them
63-
```
64-
6545
- General
6646
- home
6747
- not-found
@@ -101,28 +81,20 @@ private: only logged in users can see them
10181

10282
## 📛 Custom directives
10383

104-
- click-outside (detects when the user clicks outside an element).
84+
- click-outside: detects when the user clicks outside an element.
10585

10686
## 🧪 Custom pipes
10787

108-
- bytes (transforms a numeric value into bytes, KB, MB, GB, etc.).
88+
- bytes: transforms a numeric value into bytes, KB, MB, GB, etc.
10989

11090
## 🛠️ Make some initial tweaks
11191

112-
- Change application title:
113-
114-
Go to `src/index.html` and inside the `title` tag, replace "Angular Boilerplate" with your app name.
115-
116-
- Change paths of the pages:
92+
- Change pages routes:
11793

11894
Go to `src/app/core/utils/router.utils.ts` to find all the registered routes inside a config object.
11995

12096
For example, you could replace `sign-in` with `SignIn`, `login` or `iniciar_sesion`
12197

122-
- Change titles, descriptions, and robots of the pages:
123-
124-
Every page has a `.route` file that contains an exported constant that holds the title, description and a robot's metatag that indicates if it can be indexed or followed by a web crawler.
125-
12698
- Change your TailwindCSS configuration:
12799

128100
You can find the config file in the project root, then you can refer to https://tailwindcss.com/docs/configuration to learn how to make your own adjustments.
@@ -149,83 +121,6 @@ private: only logged in users can see them
149121
export const DEFAULT_BASE_THEME = ThemeList.Dark;
150122
```
151123

152-
## 🗑️ Remove features
153-
154-
There are certain features that you may or may not like to have in your projects, and here's how to remove them:
155-
156-
### 🌠 Husky & commitlint
157-
158-
> Husky allows you to easily run scripts on Git Hooks & commitlint validates if a commit message follows a certain convention.
159-
160-
- Remove execution of tests and linting on pre-commit:
161-
162-
- Go to `angular-boilerplate\.husky` and remove the npm scripts inside the `pre-commit` file or the file itself.
163-
164-
- Remove execution of build on pre-push:
165-
166-
- Go to `angular-boilerplate\.husky` and remove the npm scripts inside the `pre-push` file or the file itself.
167-
168-
- Remove conventional commit messages validation:
169-
170-
1. Go to `angular-boilerplate\.husky` and remove the command `npx commitlint --edit $1` inside the `commit-msg` file or the file itself.
171-
2. Remove the file `angular-boilerplate\.commitlintrc`.
172-
3. Run the following command:
173-
174-
```
175-
npm uninstall @commitlint/cli @commitlint/config-conventional
176-
```
177-
178-
OR
179-
180-
```
181-
yarn remove @commitlint/cli @commitlint/config-conventional
182-
```
183-
184-
- Fully remove Husky & commitlint
185-
186-
1. Remove the folder `angular-boilerplate\.husky`.
187-
2. Remove the file `angular-boilerplate\.commitlintrc`.
188-
3. Run the following commands:
189-
190-
```
191-
npm uninstall husky @commitlint/cli @commitlint/config-conventional
192-
```
193-
194-
OR
195-
196-
```
197-
yarn remove husky @commitlint/cli @commitlint/config-conventional
198-
```
199-
200-
### 🌠 GitHub Actions workflows
201-
202-
> A GitHub Action workflow is a configurable automated process made up of one or more jobs that will help us to validate if some actions pass before we integrate new code into the repository (E.g., run unit tests on pull-requests or branch pushes).
203-
204-
- Remove CodeQL analysis:
205-
206-
- Go to `angular-boilerplate\.github\workflows` and remove the file codeql-analysis.yml
207-
208-
- Remove tests workflow:
209-
210-
- Go to `angular-boilerplate\.github\workflows` and remove the file test.yml
211-
212-
### 🌠 TailwindCSS
213-
214-
> TailwindCSS is a utility-first CSS Framework fully customizable & fully tree shakeable. If you want to replace it with another CSS framework or don't want to use a CSS framework at all, you can easily remove it from the project.
215-
216-
1. Remove `angular-boilerplate\tailwind.config.js` file.
217-
2. Run the following command:
218-
219-
```
220-
npm uninstall tailwindcss autoprefixer postcss
221-
```
222-
223-
OR
224-
225-
```
226-
yarn remove tailwindcss autoprefixer postcss
227-
```
228-
229124
## ⛩️ Project structure
230125

231126
```console
@@ -285,13 +180,11 @@ yarn remove tailwindcss autoprefixer postcss
285180

286181
## 🧙‍♂️ Commands
287182

288-
| Command | Description | NPM | Yarn | Background command |
289-
| ----------- | -------------------------------------------------------------- | ------------------- | ---------------- | ----------------------------------------------------------- |
290-
| ng | See available commands | npm run ng | yarn ng | ng |
291-
| start | Run your app in development mode | npm start | yarn start | ng serve |
292-
| build | Build your app for production | npm run build | yarn build | ng build |
293-
| build:stats | Build your app for production and generate a "stats.json" file | npm run build:stats | yarn build:stats | ng build --stats-json |
294-
| watch | Run build when files change. | npm run watch | yarn watch | ng build --watch --configuration development |
295-
| test | Run your unit tests | npm run test | yarn test | ng test |
296-
| lint | Use ESLint to lint your app | npm run lint | yarn lint | ng lint |
297-
| analyze | Open webpack-bundle-analyzer | npm run analyze | yarn analyze | webpack-bundle-analyzer dist/angular-boilerplate/stats.json |
183+
| Command | Description | NPM | Yarn | Pnpm | Background command |
184+
| ------- | -------------------------------- | ------------- | ---------- | ---------- | -------------------------------------------- |
185+
| ng | See available commands | npm run ng | yarn ng | pnpm ng | ng |
186+
| start | Run your app in development mode | npm start | yarn start | pnpm start | ng serve |
187+
| build | Build your app for production | npm run build | yarn build | pnpm build | ng build |
188+
| watch | Run build when files change. | npm run watch | yarn watch | pnpm watch | ng build --watch --configuration development |
189+
| test | Run your unit tests | npm run test | yarn test | pnpm test | ng test |
190+
| lint | Use ESLint to lint your app | npm run lint | yarn lint | pnpm lint | ng lint |

angular.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
"schematics": {
1212
"@schematics/angular:application": {
1313
"strict": true
14-
},
15-
"@schematics/angular:component": {
16-
"style": "scss"
1714
}
1815
},
1916
"root": "",
@@ -28,9 +25,9 @@
2825
"main": "src/main.ts",
2926
"polyfills": "src/polyfills.ts",
3027
"tsConfig": "tsconfig.app.json",
31-
"inlineStyleLanguage": "scss",
28+
"inlineStyleLanguage": "css",
3229
"assets": ["src/favicon.ico", "src/assets"],
33-
"styles": ["src/theme/styles.scss"],
30+
"styles": ["src/theme/styles.css"],
3431
"scripts": []
3532
},
3633
"configurations": {
@@ -79,12 +76,14 @@
7976
"defaultConfiguration": "development"
8077
},
8178
"test": {
82-
"builder": "@angular-builders/jest:run",
79+
"builder": "@angular-devkit/build-angular:karma",
8380
"options": {
81+
"main": "src/test.ts",
8482
"polyfills": "src/polyfills.ts",
8583
"tsConfig": "tsconfig.spec.json",
84+
"karmaConfig": "karma.conf.js",
8685
"assets": ["src/favicon.ico", "src/assets"],
87-
"styles": [],
86+
"styles": ["src/theme/styles.css"],
8887
"scripts": []
8988
}
9089
},

jest.config.js

-10
This file was deleted.

karma.conf.js

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma'),
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true, // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/test-app'),
29+
subdir: '.',
30+
reporters: [{ type: 'html' }, { type: 'text-summary' }],
31+
},
32+
reporters: ['progress', 'kjhtml'],
33+
port: 9876,
34+
colors: true,
35+
logLevel: config.LOG_INFO,
36+
autoWatch: true,
37+
browsers: [],
38+
singleRun: false,
39+
restartOnFileChange: true,
40+
});
41+
};

0 commit comments

Comments
 (0)