Skip to content

Commit 3633b8d

Browse files
authored
Initial commit
0 parents  commit 3633b8d

33 files changed

+6371
-0
lines changed

.editorconfig

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Editor config
2+
# http://EditorConfig.org
3+
4+
# This EditorConfig overrides any parent EditorConfigs
5+
root = true
6+
7+
# Default rules applied to all file types
8+
[*]
9+
10+
# No trailing spaces, newline at EOF
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
end_of_line = lf
15+
16+
# 2 space indentation
17+
indent_style = space
18+
indent_size = 2
19+
20+
# JavaScript-specific settings
21+
[*.{js,ts}]
22+
quote_type = double
23+
continuation_indent_size = 2
24+
curly_bracket_next_line = false
25+
indent_brace_style = BSD
26+
spaces_around_operators = true
27+
spaces_around_brackets = none

.eslintrc.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ESLint config
2+
# http://eslint.org/docs/user-guide/configuring
3+
# https://jstools.dev/eslint-config/
4+
5+
root: true
6+
extends: "@jsdevtools"
7+
env:
8+
node: true

.gitattributes

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Git attributes
2+
# https://git-scm.com/docs/gitattributes
3+
# https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
4+
5+
# Normalize line endings for all files that git determines to be text.
6+
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvalueauto
7+
* text=auto
8+
9+
# Normalize line endings to LF on checkin, and do NOT convert to CRLF when checking-out on Windows.
10+
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvaluelf
11+
*.txt text eol=lf
12+
*.html text eol=lf
13+
*.md text eol=lf
14+
*.css text eol=lf
15+
*.scss text eol=lf
16+
*.map text eol=lf
17+
*.js text eol=lf
18+
*.jsx text eol=lf
19+
*.ts text eol=lf
20+
*.tsx text eol=lf
21+
*.json text eol=lf
22+
*.yml text eol=lf
23+
*.yaml text eol=lf
24+
*.xml text eol=lf
25+
*.svg text eol=lf

.github/workflows/CI-CD.yaml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# GitHub Actions workflow
2+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions
3+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
4+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions
5+
6+
name: CI-CD
7+
8+
on:
9+
push:
10+
branches:
11+
- "*"
12+
tags-ignore:
13+
- "*"
14+
15+
schedule:
16+
- cron: "0 0 1 * *"
17+
18+
jobs:
19+
test:
20+
name: Node ${{ matrix.node }} on ${{ matrix.os }}
21+
runs-on: ${{ matrix.os }}
22+
timeout-minutes: 10
23+
strategy:
24+
fail-fast: true
25+
matrix:
26+
os:
27+
- ubuntu-latest
28+
- macos-latest
29+
- windows-latest
30+
node:
31+
- 10
32+
- 12
33+
34+
steps:
35+
- name: Checkout source
36+
uses: actions/checkout@v2
37+
38+
- name: Install Node ${{ matrix.node }}
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: ${{ matrix.node }}
42+
43+
- name: Install dependencies
44+
run: npm ci
45+
46+
- name: Run linters
47+
run: npm run lint
48+
49+
- name: Build the code
50+
run: npm run build
51+
52+
- name: Run tests
53+
run: npm run coverage
54+
55+
- name: Send code coverage results to Coveralls
56+
uses: coverallsapp/[email protected]
57+
with:
58+
github-token: ${{ secrets.GITHUB_TOKEN }}
59+
parallel: true
60+
61+
coverage:
62+
name: Code Coverage
63+
runs-on: ubuntu-latest
64+
timeout-minutes: 10
65+
needs: test
66+
steps:
67+
- name: Let Coveralls know that all tests have finished
68+
uses: coverallsapp/[email protected]
69+
with:
70+
github-token: ${{ secrets.GITHUB_TOKEN }}
71+
parallel-finished: true
72+
73+
deploy:
74+
name: Publish to NPM
75+
if: github.ref == 'refs/heads/master'
76+
runs-on: ubuntu-latest
77+
timeout-minutes: 10
78+
needs: test
79+
80+
steps:
81+
- name: Checkout source
82+
uses: actions/checkout@v2
83+
84+
- name: Install Node
85+
uses: actions/setup-node@v1
86+
87+
- name: Install dependencies
88+
run: npm ci
89+
90+
- name: Build the code
91+
run: npm run build
92+
93+
- name: Publish to NPM
94+
uses: JS-DevTools/npm-publish@v1
95+
with:
96+
token: ${{ secrets.NPM_TOKEN }}

.gitignore

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Git ignore
2+
# https://git-scm.com/docs/gitignore
3+
4+
# Private files
5+
.env
6+
7+
# Miscellaneous
8+
*~
9+
*#
10+
.DS_STORE
11+
Thumbs.db
12+
.netbeans
13+
nbproject
14+
.node_history
15+
16+
# IDEs & Text Editors
17+
.idea
18+
.sublime-*
19+
.vscode/settings.json
20+
.netbeans
21+
nbproject
22+
23+
# Temporary files
24+
.tmp
25+
.temp
26+
.grunt
27+
.lock-wscript
28+
29+
# Logs
30+
/logs
31+
*.log
32+
33+
# Runtime data
34+
pids
35+
*.pid
36+
*.seed
37+
38+
# Dependencies
39+
node_modules
40+
41+
# Build output
42+
/lib
43+
44+
# Test output
45+
/.nyc_output
46+
/coverage

.mocharc.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Mocha options
2+
# https://mochajs.org/#configuring-mocha-nodejs
3+
# https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml
4+
5+
spec:
6+
# Test fixtures
7+
- test/fixtures/**/*.js
8+
9+
# Test specs
10+
- test/specs/**/*.spec.js
11+
12+
bail: true
13+
recursive: true
14+
require: source-map-support/register

.nycrc.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# NYC config
2+
# https://github.com/istanbuljs/nyc#configuration-files
3+
4+
extension:
5+
- .js
6+
- .ts
7+
8+
reporter:
9+
- text
10+
- lcov

.vscode/launch.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// VSCode Launch Configuration
2+
// https://code.visualstudio.com/docs/editor/debugging#_launch-configurations
3+
4+
// Available variables which can be used inside of strings.
5+
// ${workspaceRoot}: the root folder of the team
6+
// ${file}: the current opened file
7+
// ${fileBasename}: the current opened file's basename
8+
// ${fileDirname}: the current opened file's dirname
9+
// ${fileExtname}: the current opened file's extension
10+
// ${cwd}: the current working directory of the spawned process
11+
12+
{
13+
"version": "0.2.0",
14+
"configurations": [
15+
{
16+
"type": "node",
17+
"request": "launch",
18+
"name": "Run Mocha",
19+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
20+
"args": [
21+
"--timeout=60000",
22+
"--retries=0",
23+
],
24+
"outFiles": [
25+
"${workspaceFolder}/lib/**/*.js"
26+
],
27+
"smartStep": true,
28+
"skipFiles": [
29+
"<node_internals>/**/*.js"
30+
],
31+
},
32+
33+
34+
{
35+
"type": "node",
36+
"request": "launch",
37+
"name": "Run CLI",
38+
"program": "${workspaceRoot}/bin/my-cli.js",
39+
"args": [],
40+
"env": {
41+
"NODE_ENV": "development"
42+
},
43+
"outputCapture": "std",
44+
"outFiles": [
45+
"${workspaceFolder}/lib/**/*.js"
46+
],
47+
"smartStep": true,
48+
"skipFiles": [
49+
"<node_internals>/**/*.js"
50+
],
51+
}
52+
]
53+
}

.vscode/tasks.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// VSCode Tasks
2+
// https://code.visualstudio.com/docs/editor/tasks
3+
4+
// Available variables which can be used inside of strings.
5+
// ${workspaceRoot}: the root folder of the team
6+
// ${file}: the current opened file
7+
// ${fileBasename}: the current opened file's basename
8+
// ${fileDirname}: the current opened file's dirname
9+
// ${fileExtname}: the current opened file's extension
10+
// ${cwd}: the current working directory of the spawned process
11+
12+
{
13+
"version": "2.0.0",
14+
"command": "npm",
15+
"tasks": [
16+
{
17+
"type": "npm",
18+
"script": "build",
19+
"group": {
20+
"kind": "build",
21+
"isDefault": true
22+
},
23+
"problemMatcher": "$tsc"
24+
},
25+
26+
27+
{
28+
"type": "npm",
29+
"script": "test",
30+
"group": {
31+
"kind": "test",
32+
"isDefault": true
33+
},
34+
"problemMatcher": "$tslint5"
35+
},
36+
]
37+
}

404.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
layout: 404
3+
---

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Change Log
2+
====================================================================================================
3+
All notable changes will be documented in this file.
4+
My Project Name adheres to [Semantic Versioning](http://semver.org/).
5+
6+
7+
[v1.0.0](https://github.com/MyGitHubOrg/my-repo-name/tree/v1.0.0) (XXXX-XX-XX)
8+
----------------------------------------------------------------------------------------------------
9+
10+
Initial release 🎉

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 James Messinger
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)