Skip to content

Commit

Permalink
chore: refactoring project structure and updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrecanijo committed Oct 11, 2022
1 parent f15c165 commit 9a6936d
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 3 deletions.
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- markdownlint-disable-file MD024 -->

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.6] - 2022-10-11

### Changed

- Updated README
- Added several files for improving the repository
- Refactored project - moving the code inside src

## [0.0.5] - 2022-10-10

### Changed

- Updating all packages to latest version

## [0.0.4] - 2022-09-21

### Fixed

- Trying to fix performance score, by removing tailwind and maintaining the same visual aspect

## [0.0.3] - 2022-09-08

### Fixed

- Fixing Accessibility and SEO issues with last Lighthouse performance report

## [0.0.2] - 2022-09-08

### Changed

- Updating initial packages

## [0.0.1] - 2022-09-08

### Added

- Initial Nuxt2 setup without any actual changes on code

[0.0.6]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.5...v0.0.6
[0.0.5]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.4...v0.0.5
[0.0.4]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/compare/v0.0.1...v0.0.2
[0.0.1]: https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate/commits/v0.0.1
131 changes: 131 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to [Alexandre Canijo](https://github.com/alexandrecanijo).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Thank you for contributing!

**Please follow these steps to get your work merged in.**

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

- [Alexandre Canijo](https://github.com/alexandrecanijo)
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,35 @@

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.

---

## Why

Generating a fresh setup of a Nuxt2 application is always a tedious process and by default, it won't achieve a good Lighthouse score.
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.

---

## How

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

---

## Table of contents

- [Requirements](#requirements)
- [Installation](#installation)
- [Commands](#commands)
- [Features](#features)
- [Roadmap](#roadmap)
- [Google Lighthouse score](#google-lighthouse-score)
- [Licenses](#licenses)
- [Inspiration](#inspiration)
- [Want to contribute?](#want-to-contribute)

---

## Requirements

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

---

## Installation

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

---

## Commands

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

---

## Features

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

---

## Roadmap

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

---

## Google Lighthouse score

- Performance - 100
- Accessibility - 100
- Best practices - 100
- SEO - 100

---

## Licenses

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

---

## Inspiration

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.
Expand All @@ -101,3 +126,9 @@ Here are some links that this project is based on:
- https://github.com/larsdouweschuitema-nuxt/nuxt-boilerplate
- https://dev.to/jacobandrewsky/performance-checklist-for-vue-and-nuxt-cog
- https://github.com/harlan-zw/nuxt-webpack-optimisations

---

## Want to Contribute?

Please check out [CONTRIBUTING.md](CONTRIBUTING.md).
Empty file added SUPPORT.md
Empty file.
4 changes: 1 addition & 3 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const isDev = process.env.NODE_ENV !== 'production';

export default {
srcDir: 'src/',

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

modern: !isDev,
modern: ({ isDev }) => !isDev,

// Global page headers: https://go.nuxtjs.dev/config-head
head: {
Expand Down

0 comments on commit 9a6936d

Please sign in to comment.