Skip to content

Commit 9a6936d

Browse files
chore: refactoring project structure and updating README
1 parent f15c165 commit 9a6936d

File tree

7 files changed

+232
-3
lines changed

7 files changed

+232
-3
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!-- markdownlint-disable-file MD024 -->
2+
3+
# Changelog
4+
5+
All notable changes to this project will be documented in this file.
6+
7+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9+
10+
## [0.0.6] - 2022-10-11
11+
12+
### Changed
13+
14+
- Updated README
15+
- Added several files for improving the repository
16+
- Refactored project - moving the code inside src
17+
18+
## [0.0.5] - 2022-10-10
19+
20+
### Changed
21+
22+
- Updating all packages to latest version
23+
24+
## [0.0.4] - 2022-09-21
25+
26+
### Fixed
27+
28+
- Trying to fix performance score, by removing tailwind and maintaining the same visual aspect
29+
30+
## [0.0.3] - 2022-09-08
31+
32+
### Fixed
33+
34+
- Fixing Accessibility and SEO issues with last Lighthouse performance report
35+
36+
## [0.0.2] - 2022-09-08
37+
38+
### Changed
39+
40+
- Updating initial packages
41+
42+
## [0.0.1] - 2022-09-08
43+
44+
### Added
45+
46+
- Initial Nuxt2 setup without any actual changes on code
47+
48+
[0.0.6]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.5...v0.0.6
49+
[0.0.5]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.4...v0.0.5
50+
[0.0.4]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.3...v0.0.4
51+
[0.0.3]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.2...v0.0.3
52+
[0.0.2]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.1...v0.0.2
53+
[0.0.1]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/commits/v0.0.1

CODE_OF_CONDUCT.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to [Alexandre Canijo](https://github.com/alexandrecanijo).
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
125+
[https://www.contributor-covenant.org/translations][translations].
126+
127+
[homepage]: https://www.contributor-covenant.org
128+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
129+
[mozilla coc]: https://github.com/mozilla/diversity
130+
[faq]: https://www.contributor-covenant.org/faq
131+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Thank you for contributing!
2+
3+
**Please follow these steps to get your work merged in.**
4+
5+
1. Clone the repo and make a new branch: `$ git checkout https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate.git -b [name_of_new_branch]`.
6+
2. Run `npm install` in the repository root.
7+
3. Add a feature, fix a bug, or refactor some code :)
8+
4. Write/update tests for the changes you made, if necessary.
9+
5. Run unit tests and make sure all tests pass: `npm run test`.
10+
6. Run lint and check that all code meets the standard: `npm run lint`.
11+
7. Update `README.md` and `CONTRIBUTORS.md`, if necessary.
12+
8. Open a Pull Request with a comprehensive description of changes.
13+
9. Give yourself a pat on the back to help out on improving this repository. Thanks!

CONTRIBUTORS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributors
2+
3+
- [Alexandre Canijo](https://github.com/alexandrecanijo)

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,35 @@
66

77
A starting point and reusable Nuxt2 application, based on the one generated by Nuxt-CLI with all settings already setup up, with performance in mind, to achieve a 100% Lighthouse score.
88

9+
---
10+
911
## Why
1012

1113
Generating a fresh setup of a Nuxt2 application is always a tedious process and by default, it won't achieve a good Lighthouse score.
1214
This project aims to speed up the process of starting up an application and trying to get a perfect Lighthouse score, with all the main features a medium/large application should have.
1315

16+
---
17+
1418
## How
1519

1620
By setting up some Nuxt configs, removing all the clutter and still having a viable boilerplate.
1721
The goal is to have with every update a perfect 100 Lighthouse score.
1822

23+
---
24+
1925
## Table of contents
2026

2127
- [Requirements](#requirements)
2228
- [Installation](#installation)
2329
- [Commands](#commands)
2430
- [Features](#features)
31+
- [Roadmap](#roadmap)
2532
- [Google Lighthouse score](#google-lighthouse-score)
2633
- [Licenses](#licenses)
34+
- [Inspiration](#inspiration)
35+
- [Want to contribute?](#want-to-contribute)
36+
37+
---
2738

2839
## Requirements
2940

@@ -33,6 +44,8 @@ The only tools you will need installed on your machine are:
3344
- a package manager (Yarn or NPM) - [Download and Install Yarn](https://yarnpkg.com/getting-started/install)
3445
(NPM already comes bundle with Node.js)
3546

47+
---
48+
3649
## Installation
3750

3851
Clone repository and run project locally:
@@ -43,6 +56,8 @@ $ cd nuxt2-lighthouse-boilerplate # Change directory
4356
$ npm install # Install required dependencies
4457
```
4558

59+
---
60+
4661
## Commands
4762

4863
Launch development server at localhost:3000
@@ -69,30 +84,40 @@ Generate a static project
6984
$ npm run generate
7085
```
7186

87+
---
88+
7289
## Features
7390

7491
- Disabled core Nuxt features, that should only be enabled when needed
7592
- Enabled HTTP2 (if possible) and added a bunch of webpack optimizations to speed up first page impression
7693
- All code resides on `src/` directory
7794

95+
---
96+
7897
## Roadmap
7998

8099
- Add Lighthouse-CI under Github Actions
81100
- Add Cypress integration and example e2e tests
82101
- Improve documentation
83102
- Add common features, i18n, light/dark theme, accessibility analysis, etc.
84103

104+
---
105+
85106
## Google Lighthouse score
86107

87108
- Performance - 100
88109
- Accessibility - 100
89110
- Best practices - 100
90111
- SEO - 100
91112

113+
---
114+
92115
## Licenses
93116

94117
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
95118

119+
---
120+
96121
## Inspiration
97122

98123
Several articles and repositories inspired me to create this one, but the main goal was to have a starting point, for all my Nuxt apps.
@@ -101,3 +126,9 @@ Here are some links that this project is based on:
101126
- https://github.com/larsdouweschuitema-nuxt/nuxt-boilerplate
102127
- https://dev.to/jacobandrewsky/performance-checklist-for-vue-and-nuxt-cog
103128
- https://github.com/harlan-zw/nuxt-webpack-optimisations
129+
130+
---
131+
132+
## Want to Contribute?
133+
134+
Please check out [CONTRIBUTING.md](CONTRIBUTING.md).

SUPPORT.md

Whitespace-only changes.

nuxt.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
const isDev = process.env.NODE_ENV !== 'production';
2-
31
export default {
42
srcDir: 'src/',
53

64
// Target: https://go.nuxtjs.dev/config-target
75
target: 'static',
86

9-
modern: !isDev,
7+
modern: ({ isDev }) => !isDev,
108

119
// Global page headers: https://go.nuxtjs.dev/config-head
1210
head: {

0 commit comments

Comments
 (0)