Skip to content

Commit 2c27b00

Browse files
committedAug 17, 2021
Boilerplate Boom
0 parents  commit 2c27b00

20 files changed

+357
-0
lines changed
 

‎.circleci/config.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
version: 2.1
2+
3+
workflows:
4+
version: 2
5+
node-multi-build:
6+
jobs:
7+
- node-v10
8+
- node-v12
9+
- node-v14
10+
11+
jobs:
12+
node-v10:
13+
docker:
14+
- image: node:10
15+
steps:
16+
- build
17+
node-v12:
18+
docker:
19+
- image: node:12
20+
steps:
21+
- build
22+
node-v14:
23+
docker:
24+
- image: node:14
25+
steps:
26+
- build
27+
28+
commands:
29+
build:
30+
steps:
31+
- run:
32+
name: Node Version
33+
command: npm version
34+
- checkout
35+
- restore_cache:
36+
keys:
37+
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
38+
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-master-{{ .Environment.CIRCLE_JOB }}
39+
- run:
40+
name: Install dependencies
41+
command: npm ci
42+
- run:
43+
name: Run Test
44+
command: npm run jest
45+
- run:
46+
name: Run ESLINT
47+
command: npm run eslint
48+
- save-npm-cache
49+
save-npm-lock:
50+
steps:
51+
- save_cache:
52+
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}
53+
paths:
54+
- node_modules
55+
save-npm-cache:
56+
steps:
57+
- save_cache:
58+
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}
59+
paths:
60+
- ~/.npm/_cacache

‎.editorconfig

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
indent_size = 2
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
# Matches multiple files with brace expansion notation
15+
# Set default charset
16+
[*.{js,py}]
17+
charset = utf-8
18+
19+
# Indentation override for all JS under lib directory
20+
[lib/**.js]
21+
indent_style = space
22+
indent_size = 2
23+
24+
# Matches the exact files either package.json or .travis.yml
25+
[{package.json,.travis.yml}]
26+
indent_style = space
27+
indent_size = 2
28+
29+
# Rules for markdown documents
30+
[*.md]
31+
trim_trailing_whitespace = false
32+
indent_size = 4
33+
34+
[*.json]
35+
indent_size = 4

‎.eslintrc.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
root: true
2+
3+
parserOptions:
4+
ecmaVersion: 2020
5+
6+
extends:
7+
- airbnb-base
8+
- plugin:jsdoc/recommended
9+
- plugin:security/recommended
10+
- plugin:prettier/recommended
11+
12+
plugins:
13+
- jsdoc
14+
- security
15+
16+
rules:
17+
arrow-body-style: 0
18+
camelcase: 0
19+
class-methods-use-this: 0
20+
consistent-return: 0
21+
curly: ["error", "all"]
22+
func-names: 0
23+
function-paren-newline: 0
24+
global-require: 0
25+
implicit-arrow-linebreak: "off"
26+
jsdoc/check-examples: "off"
27+
jsdoc/check-tag-names: "error"
28+
jsdoc/no-undefined-types: "off"
29+
jsdoc/require-returns-description: "off"
30+
no-multi-assign: 0
31+
no-param-reassign: 0
32+
no-restricted-syntax: ["error", "ForInStatement", "LabeledStatement", "WithStatement"]
33+
no-underscore-dangle: 0
34+
prefer-arrow-callback: 0
35+
security/detect-object-injection: 0
36+
37+
settings:
38+
jsdoc:
39+
preferredTypes:
40+
object: Object
41+
express: Express
42+
Function: function
43+
knex: Knex
44+
tagNamePreference:
45+
constant: const
46+
file: fileoverview
47+
returns: return

‎.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules/
2+
npm-debug.log
3+
dump.rdb
4+
wiki
5+
temp
6+
*.iml
7+
.idea
8+
coverage
9+
.DS_Store
10+
db_data
11+
junit.xml
12+
.env

‎.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
14.15.5

‎.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"printWidth": 80
5+
}

‎.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": true
3+
}

‎LICENSE

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License (ISC)
2+
3+
Copyright © Thanos Polychronakis and Authors, Licensed under ISC.
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
14+
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
15+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

‎README.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Awesome Lib name
2+
3+
> The awesome lib description
4+
5+
[![CircleCI](https://circleci.com/gh/thanpolas/[...].svg?style=svg)](https://circleci.com/gh/thanpolas/[...])
6+
[![codecov](https://codecov.io/gh/thanpolas/[...]/branch/develop/graph/badge.svg)](https://codecov.io/gh/thanpolas/[...])
7+
[![npm version](https://badge.fury.io/js/[...].svg)](https://badge.fury.io/js/[...])
8+
[![Discord](https://img.shields.io/discord/847075821276758096)](https://discord.gg/GkyEqzJWEY)
9+
[![Twitter Follow](https://img.shields.io/twitter/follow/thanpolas.svg?label=thanpolas&style=social)](https://twitter.com/thanpolas)
10+
11+
## Install
12+
13+
Install the module using NPM:
14+
15+
```
16+
npm install @thanpolas/awesome-lib --save
17+
```
18+
19+
## Documentation
20+
21+
22+
## Update Node Version
23+
24+
When a new node version is available you need to updated it in the following:
25+
26+
- `/package.json`
27+
- `/.nvmrc`
28+
- `/.circleci/config.yml`
29+
30+
## Releasing
31+
32+
1. Update the changelog bellow ("Release History").
33+
1. Ensure you are on master and your repository is clean.
34+
1. Type: `npm run release` for patch version jump.
35+
- `npm run release:minor` for minor version jump.
36+
- `npm run release:major` for major major jump.
37+
38+
## Release History
39+
40+
- **v0.0.1**, *TBD*
41+
- Big Bang
42+
43+
## License
44+
45+
Copyright © [Thanos Polychronakis][thanpolas] and Authors, [Licensed under ISC](/LICENSE).
46+
47+
[![CircleCI](https://circleci.com/gh/thanpolas/awesomelib/tree/main.svg?style=svg)](https://circleci.com/gh/thanpolas/awesomelib/tree/main)

‎SECURITY.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| >=0.0.0 | :white_check_mark: |
11+
12+
## Reporting a Vulnerability
13+
14+
Please report any severe vulnerabilities directly to the author, Thanos Polychronakis at thanpolas@gmail.com

‎app/index.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Awesome Lib
3+
* Awesomesauce and sausages
4+
*
5+
* https://github.com/thanpolas/awesome
6+
*
7+
* Copyright © Thanos Polychronakis
8+
* LICENSE on /LICENSE file.
9+
*/
10+
11+
/**
12+
* @fileOverview bootstrap and master exporting module.
13+
*/
14+
15+
const app = module.exports = {};

‎package.json

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "@thanpolas/awesome",
3+
"version": "0.0.0",
4+
"main": "./app/",
5+
"description": "Awesome Lib",
6+
"homepage": "https://github.com/thanpolas/awesome",
7+
"bugs": "https://github.com/thanpolas/awesome/issues",
8+
"author": {
9+
"name": "Thanos Polychronakis",
10+
"email": "thanpolas@gmail.com"
11+
},
12+
"contributors": [
13+
""
14+
],
15+
"repository": {
16+
"type": "git",
17+
"url": "https://github.com/thanpolas/awesome"
18+
},
19+
"license": "ISC",
20+
"engines": {
21+
"node": "14.15.5"
22+
},
23+
"scripts": {
24+
"test": "eslint app test && jest",
25+
"release": "release-it --ci",
26+
"release:minor": "release-it minor --ci",
27+
"release:major": "release-it major --ci",
28+
"eslint": "eslint app test"
29+
},
30+
"jest": {
31+
"coverageReporters": [
32+
"html",
33+
"text-summary"
34+
],
35+
"roots": [
36+
"./test/app",
37+
"./test/unit"
38+
],
39+
"testEnvironment": "node",
40+
"setupFilesAfterEnv": [
41+
"jest-extended"
42+
],
43+
"globalSetup": "./test/lib/global-setup.test.js",
44+
"testTimeout": 10000
45+
},
46+
"dependencies": {},
47+
"devDependencies": {
48+
"@types/jest": "26.0.24",
49+
"eslint": "7.31.0",
50+
"eslint-config-airbnb-base": "14.2.1",
51+
"eslint-config-prettier": "8.3.0",
52+
"eslint-plugin-import": "2.23.4",
53+
"eslint-plugin-jest": "24.3.6",
54+
"eslint-plugin-jsdoc": "35.4.5",
55+
"eslint-plugin-prettier": "3.4.0",
56+
"eslint-plugin-security": "1.4.0",
57+
"expect": "27.0.6",
58+
"jest": "27.0.6",
59+
"jest-extended": "0.11.5",
60+
"jest-junit": "12.2.0",
61+
"release-it": "14.10.0",
62+
"prettier": "2.3.2"
63+
}
64+
}

‎test/.eslintrc.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
extends:
2+
- plugin:jest/recommended
3+
4+
plugins:
5+
- jest
6+
7+
env:
8+
jest/globals: true
9+
10+
rules:
11+
no-console: 'off'
12+
jsdoc/require-jsdoc: 'off'
13+
# Due to extended custom asserters there are many tests without
14+
# an expect statement.
15+
jest/expect-expect: 0

‎test/app/.gitkeep

Whitespace-only changes.

‎test/assert/.gitkeep

Whitespace-only changes.

‎test/fixtures/.gitkeep

Whitespace-only changes.

‎test/lib/global-setup.test.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* @fileoverview Test boot up sequence.
3+
*/
4+
5+
module.exports = async () => {
6+
console.log('\n\nGlobal Test Setup initiates...');
7+
};

‎test/lib/tester.lib.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @fileoverview Main testing helper lib.
3+
*/
4+
5+
const tester = (module.exports = {});
6+
7+
/**
8+
* Have a Cooldown period between tests.
9+
*
10+
* @param {number} seconds cooldown in seconds.
11+
* @return {function} use is beforeEach().
12+
*/
13+
tester.cooldown = function (seconds) {
14+
return function (done) {
15+
setTimeout(done, seconds);
16+
};
17+
};

‎test/setup/.gitkeep

Whitespace-only changes.

‎test/unit/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)
Please sign in to comment.