-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(npm package): cli restructure (#15)
BREAKING CHANGE: npm packaging, cli * build, update tooling for editor, ci, testing * build, readme cli additions, contributing * build, github request templates * cli, added bin script * docker, cmd script updated towards cli * tests, breakout ecma class for testing
- Loading branch information
Showing
31 changed files
with
3,738 additions
and
748 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,20 @@ | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "50...95" | ||
|
||
status: | ||
project: | ||
default: | ||
target: "65%" | ||
patch: | ||
default: off | ||
changes: | ||
default: off | ||
|
||
comment: | ||
layout: "header, reach, diff, flags, files, footer" | ||
behavior: default | ||
require_changes: no | ||
require_base: no | ||
require_head: yes |
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 |
---|---|---|
@@ -1,12 +1,18 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
|
||
[*.snap] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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
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,21 @@ | ||
--- | ||
name: Bug report | ||
about: A clear and concise description of what the bug is. | ||
|
||
--- | ||
|
||
## Summary: | ||
<!-- Provide a description of the issue being raised. --> | ||
|
||
### Steps to reproduce | ||
<!-- List clear steps to reproduce the bug. --> | ||
1. | ||
1. | ||
|
||
### Expected Result | ||
<!-- Describe the expected behavior for the program. --> | ||
... | ||
|
||
## Additional Context | ||
<!-- Append a demo/screenshot/animated gif of the problem. Package.json version, tag, or git commit information. --> | ||
... |
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: Feature request | ||
about: Suggest a feature, or enhancement, for this project. | ||
|
||
--- | ||
|
||
## Feature description | ||
As user X, I want Y to happen so that Z. | ||
|
||
### Is your feature request related to a problem? | ||
<!-- Provide a clear, concise description of what the problem is. --> | ||
... | ||
|
||
### Describe the solution you'd like | ||
<!-- A clear and concise description of what you want to happen. --> | ||
... | ||
|
||
## Acceptance Criteria | ||
|
||
- [ ] X should happen | ||
- [ ] Y should also happen for Z | ||
|
||
<!-- ## Assumptions and Questions --> |
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,25 @@ | ||
## What's included | ||
<!-- List your changes/additions, or commits --> | ||
... | ||
|
||
<!-- ### Notes --> | ||
<!-- Anything funky about your updates. Or issues that aren't resolved by this merge request, things of note? --> | ||
|
||
## How to test | ||
<!-- Are there directions to test/review? --> | ||
<!-- | ||
### Coverage and basic unit test check | ||
1. update the NPM packages with `$ yarn` | ||
1. `$ yarn test` | ||
### Interactive unit test check | ||
1. update the NPM packages with `$ yarn` | ||
1. `$ yarn test:dev` | ||
--> | ||
... | ||
|
||
## Example | ||
<!-- Append a demo/screenshot/animated gif, or a link to the aforementioned, of the cli output --> | ||
... | ||
|
||
## Updates issue/story | ||
<!-- What issue/story does this update, i.e Updates #33 --> |
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 |
---|---|---|
@@ -1,8 +1,22 @@ | ||
.env.local | ||
*.log | ||
dist | ||
# dependencies | ||
node_modules | ||
package-lock.json | ||
.yarn-integrity | ||
|
||
# coverage | ||
lib-cov | ||
coverage | ||
.nyc* | ||
docs | ||
*.lcov | ||
|
||
# logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
api-debug* | ||
|
||
# misc | ||
.env | ||
.docs |
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 @@ | ||
* | ||
!package.json | ||
!bin/**/*.js | ||
!data/**/*.js | ||
!src/**/*.js | ||
src/**/*test.js | ||
src/**/*.archive | ||
!LICENSE | ||
!README.md | ||
!CHANGELOG.md |
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 @@ | ||
language: node_js | ||
|
||
cache: yarn | ||
|
||
jobs: | ||
include: | ||
- stage: test | ||
env: | ||
- NAME=yarn | ||
node_js: "10" | ||
before_script: yarn global add codecov | ||
script: yarn test | ||
after_success: codecov |
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,48 @@ | ||
# Contributing | ||
|
||
## Commits | ||
For consistency we make use of [Conventional Commits](https://www.conventionalcommits.org). It's encouraged that | ||
commit messaging follow the format | ||
``` | ||
<type>[optional scope]: <description> | ||
``` | ||
|
||
### Build Requirements | ||
To setup your work environment you'll need to use | ||
* [NodeJS version 10+](https://nodejs.org/) | ||
* [Yarn 1.13+](https://yarnpkg.com) | ||
* And if you plan on making Docker contributions you may want to setup | ||
- [Docker](https://docs.docker.com/engine/installation/) | ||
|
||
### Developing | ||
To start work | ||
```shell | ||
$ yarn | ||
$ yarn start:dev | ||
``` | ||
|
||
#### Testing during development | ||
Jest is used for the unit test framework. To run unit tests during development open a terminal instance and run | ||
```shell | ||
$ yarn test:dev | ||
``` | ||
|
||
This should also let you update the code snapshots. | ||
|
||
### Code Coverage | ||
The requirements for code coverage are currently maintained around the `60%` to `70%` mark. | ||
|
||
Updates that drop coverage below the current threshold should have their coverage expanded before being merged. | ||
|
||
Settings for coverage can be found in [package.json](./package.json) | ||
|
||
#### To check test coverage | ||
```shell | ||
$ yarn test | ||
``` | ||
|
||
#### Code coverage failing to update? | ||
If you're having trouble getting an accurate code coverage report, or it's failing to provide updated results (i.e. you renamed files) you can try running | ||
``` | ||
$ yarn test:clearCache | ||
``` |
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
Oops, something went wrong.