-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial Oak extension for SuperDeno - _SuperOak_.
- Loading branch information
1 parent
f9795ac
commit 5371840
Showing
31 changed files
with
7,404 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ChangeLog | ||
|
||
## [1.0.0] - 01-06-2020 | ||
|
||
- feat: initial Oak extension for SuperDeno - _SuperOak_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# CODEOWNERS | ||
|
||
- @asos-craigmorten - <craig.morten@asos.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Contributing to this repository | ||
|
||
First of all, thanks for taking the time to read this document and contributing to our codebase! :tada: | ||
|
||
Please read each section carefully. | ||
|
||
## Getting started | ||
|
||
The first thing to do before starting to work on your feature would be to have a conversation with the codeowners about it, we may have some pointers or examples that might make your life much easier! | ||
|
||
The other thing you will need before you start is to create an issue describing what it is that you're set to do, or if its a bug make sure there are clear reproduction steps on the description. | ||
|
||
Things to talk about in our first conversation: | ||
|
||
- Planned implementation | ||
- Test plan | ||
|
||
Be sure to check for existing issues before raising your own! | ||
|
||
## Working on your feature | ||
|
||
### Branching | ||
|
||
On this project we follow mainline development (or trunk based development), and our default branch is `master`. | ||
|
||
Therefore you need to branch from `master` and merge into `master`. | ||
|
||
We use the following convention for branch names `feat/issue-#-short-description`, where the the `#` should be replaced with the GitHub issue number, and the short description should provide an idea of what the branch is for. | ||
|
||
Here are some examples: | ||
|
||
- `feat/issue-137-new-icon`, a new feature. | ||
- `fix/issue-239-windows-bug`, a bug fix. | ||
- `chore/issue-95-improve-docs`, a chore is something that doesn't add functionality to the user but needs to be done. | ||
|
||
### Coding style | ||
|
||
Generally try to match the style and conventions of the code around your changes. Ultimately we want code that is clear, concise, consistent and easy to read. | ||
|
||
Broadly we're in-tune with the following style guides: | ||
|
||
- <https://github.com/prettier/prettier> | ||
- <https://github.com/airbnb/javascript> | ||
- <https://github.com/ryanmcdermott/clean-code-javascript> | ||
|
||
As this is a Deno project will also insist on meeting the Deno `fmt` standards. | ||
|
||
### Format Code | ||
|
||
To format the code run: | ||
|
||
```bash | ||
make fmt | ||
``` | ||
|
||
To ensure that your code is properly formatted run: | ||
|
||
```bash | ||
make lint | ||
``` | ||
|
||
### Tests | ||
|
||
Before opening a PR, please run the following command to make sure your branch will build and pass all the tests: | ||
|
||
```console | ||
make test | ||
``` | ||
|
||
If your change will impact server performance, you can use: | ||
|
||
```bash | ||
make benchmark | ||
``` | ||
|
||
to get a benchmark report for your changes. | ||
|
||
### Documentation | ||
|
||
Before opening a PR, please delete your `./docs` directory and run the following command to make sure your branch will being fully documented: | ||
|
||
```console | ||
make typedoc | ||
``` | ||
|
||
Please also ensure that the `./docs/_config.yaml` is re-instated. | ||
|
||
### Run Tests | ||
|
||
```bash | ||
make test | ||
``` | ||
|
||
## Opening a PR | ||
|
||
Once you're confident your branch is ready to review, open a PR against `master` on this repo. | ||
|
||
Please make sure you fill the PR template correctly. | ||
|
||
## Merging and publishing | ||
|
||
When your feature branch/PR has been tested and has an approval, it is then ready to merge. Please contact the maintainer to action the merge. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Issue | ||
|
||
Setup: | ||
|
||
- Deno Version: <replace_with_deno_version (try `deno --version`)> | ||
- v8 Version: <replace_with_v8_version> | ||
- Typescript Version: <replace_with_typescript_version> | ||
- Opine Version: <replace_with_opine_version> | ||
|
||
> Please replace this line with a short description of the issue. | ||
## Details | ||
|
||
> Please replace this quote block with the details of the feature / bug you wish to be addressed. If it is a bug please do your best to add steps to reproduce. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Issue | ||
|
||
[_ISSUE_ID_](https://github.com/asos-craigmorten/opine/issues/_ISSUE_ID_) | ||
|
||
## Details | ||
|
||
Brief summary of PR purpose and code changes. | ||
|
||
## CheckList | ||
|
||
- [ ] PR starts with [_ISSUE_ID_] and branch name is e.g. feature/_description_ (see branching strategy in [CONTRIBUTING](./CONTRIBUTING.md)). | ||
- [ ] Squashed commit message is prefixed with [_ISSUE_ID_] as above. | ||
- [ ] Has been tested (where required) before merge to develop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
deno-version: [1.0.0, 1.0.2, 1.0.3] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Deno ${{ matrix.deno-version }} | ||
uses: denolib/setup-deno@master | ||
with: | ||
deno-version: ${{ matrix.deno-version }} | ||
- run: make ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"deno.enable": true, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "axetroy.vscode-deno" | ||
}, | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "axetroy.vscode-deno" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# 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, 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 the community leaders responsible for enforcement at | ||
<craig.morten@asos.com>. 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.0, available at | ||
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>. | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct | ||
enforcement ladder](https://github.com/mozilla/diversity). | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
<https://www.contributor-covenant.org/faq>. Translations are available at | ||
<https://www.contributor-covenant.org/translations>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(The MIT License) | ||
|
||
Copyright (c) 2020 Craig Morten <craig.morten@asos.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.PHONY: build ci doc fmt fmt-check lock precommit test typedoc | ||
|
||
build: | ||
@deno run --lock=lock.json --reload mod.ts | ||
|
||
ci: | ||
@make fmt-check | ||
@make build | ||
@make test | ||
|
||
doc: | ||
@deno doc ./mod.ts | ||
|
||
fmt: | ||
@deno fmt | ||
|
||
fmt-check: | ||
@deno fmt --check | ||
|
||
lock: | ||
@deno run --lock=lock.json --lock-write --reload mod.ts | ||
|
||
precommit: | ||
@make lock | ||
@make typedoc | ||
@make fmt | ||
@make fmt | ||
|
||
test: | ||
@deno test --allow-net --allow-read | ||
|
||
typedoc: | ||
@typedoc --ignoreCompilerErrors --out ./docs --mode modules --includeDeclarations --excludeExternals ./src | ||
|
Oops, something went wrong.