Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stars1233 authored Jun 28, 2024
0 parents commit 3633b8d
Show file tree
Hide file tree
Showing 33 changed files with 6,371 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Editor config
# http://EditorConfig.org

# This EditorConfig overrides any parent EditorConfigs
root = true

# Default rules applied to all file types
[*]

# No trailing spaces, newline at EOF
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

# 2 space indentation
indent_style = space
indent_size = 2

# JavaScript-specific settings
[*.{js,ts}]
quote_type = double
continuation_indent_size = 2
curly_bracket_next_line = false
indent_brace_style = BSD
spaces_around_operators = true
spaces_around_brackets = none
8 changes: 8 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ESLint config
# http://eslint.org/docs/user-guide/configuring
# https://jstools.dev/eslint-config/

root: true
extends: "@jsdevtools"
env:
node: true
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Git attributes
# https://git-scm.com/docs/gitattributes
# https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes

# Normalize line endings for all files that git determines to be text.
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvalueauto
* text=auto

# Normalize line endings to LF on checkin, and do NOT convert to CRLF when checking-out on Windows.
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvaluelf
*.txt text eol=lf
*.html text eol=lf
*.md text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.map text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.xml text eol=lf
*.svg text eol=lf
96 changes: 96 additions & 0 deletions .github/workflows/CI-CD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# GitHub Actions workflow
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions

name: CI-CD

on:
push:
branches:
- "*"
tags-ignore:
- "*"

schedule:
- cron: "0 0 1 * *"

jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node:
- 10
- 12

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci

- name: Run linters
run: npm run lint

- name: Build the code
run: npm run build

- name: Run tests
run: npm run coverage

- name: Send code coverage results to Coveralls
uses: coverallsapp/github-action@v1.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

coverage:
name: Code Coverage
runs-on: ubuntu-latest
timeout-minutes: 10
needs: test
steps:
- name: Let Coveralls know that all tests have finished
uses: coverallsapp/github-action@v1.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

deploy:
name: Publish to NPM
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
timeout-minutes: 10
needs: test

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v1

- name: Install dependencies
run: npm ci

- name: Build the code
run: npm run build

- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Git ignore
# https://git-scm.com/docs/gitignore

# Private files
.env

# Miscellaneous
*~
*#
.DS_STORE
Thumbs.db
.netbeans
nbproject
.node_history

# IDEs & Text Editors
.idea
.sublime-*
.vscode/settings.json
.netbeans
nbproject

# Temporary files
.tmp
.temp
.grunt
.lock-wscript

# Logs
/logs
*.log

# Runtime data
pids
*.pid
*.seed

# Dependencies
node_modules

# Build output
/lib

# Test output
/.nyc_output
/coverage
14 changes: 14 additions & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Mocha options
# https://mochajs.org/#configuring-mocha-nodejs
# https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml

spec:
# Test fixtures
- test/fixtures/**/*.js

# Test specs
- test/specs/**/*.spec.js

bail: true
recursive: true
require: source-map-support/register
10 changes: 10 additions & 0 deletions .nycrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NYC config
# https://github.com/istanbuljs/nyc#configuration-files

extension:
- .js
- .ts

reporter:
- text
- lcov
53 changes: 53 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// VSCode Launch Configuration
// https://code.visualstudio.com/docs/editor/debugging#_launch-configurations

// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process

{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run Mocha",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"--timeout=60000",
"--retries=0",
],
"outFiles": [
"${workspaceFolder}/lib/**/*.js"
],
"smartStep": true,
"skipFiles": [
"<node_internals>/**/*.js"
],
},


{
"type": "node",
"request": "launch",
"name": "Run CLI",
"program": "${workspaceRoot}/bin/my-cli.js",
"args": [],
"env": {
"NODE_ENV": "development"
},
"outputCapture": "std",
"outFiles": [
"${workspaceFolder}/lib/**/*.js"
],
"smartStep": true,
"skipFiles": [
"<node_internals>/**/*.js"
],
}
]
}
37 changes: 37 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// VSCode Tasks
// https://code.visualstudio.com/docs/editor/tasks

// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process

{
"version": "2.0.0",
"command": "npm",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$tsc"
},


{
"type": "npm",
"script": "test",
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": "$tslint5"
},
]
}
3 changes: 3 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
layout: 404
---
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Change Log
====================================================================================================
All notable changes will be documented in this file.
My Project Name adheres to [Semantic Versioning](http://semver.org/).


[v1.0.0](https://github.com/MyGitHubOrg/my-repo-name/tree/v1.0.0) (XXXX-XX-XX)
----------------------------------------------------------------------------------------------------

Initial release 🎉
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019 James Messinger

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.
Loading

0 comments on commit 3633b8d

Please sign in to comment.