generated from chiffre-io/template-library
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Francois Best
committed
Mar 14, 2020
0 parents
commit eac3ab8
Showing
12 changed files
with
4,680 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,16 @@ | ||
version: 1 | ||
update_configs: | ||
# Dependencies | ||
- package_manager: "javascript" | ||
directory: "/" | ||
update_schedule: "weekly" | ||
default_assignees: | ||
- "franky47" | ||
# GitHub Actions | ||
- package_manager: "github_actions" | ||
directory: "/" | ||
update_schedule: "weekly" | ||
default_reviewers: | ||
- "franky47" | ||
default_assignees: | ||
- "franky47" |
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,39 @@ | ||
name: Continuous Delivery | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
cd: | ||
name: Continuous Delivery | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: yarn-cache | ||
name: Get Yarn cache path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/checkout@722adc6 | ||
- uses: actions/setup-node@1c5c137 | ||
with: | ||
node-version: 12.x | ||
- uses: actions/cache@70655ec | ||
name: Load Yarn cache | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install --ignore-scripts | ||
name: Install dependencies | ||
- run: yarn build | ||
name: Build package | ||
|
||
# Continuous Delivery Pipeline -- | ||
|
||
- uses: codfish/semantic-release-action@a313b22 | ||
name: Semantic Release | ||
id: semantic | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,44 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- next | ||
- feature/* | ||
|
||
jobs: | ||
ci: | ||
name: Continuous Integration | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: yarn-cache | ||
name: Get Yarn cache path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/checkout@722adc6 | ||
- uses: actions/setup-node@1c5c137 | ||
with: | ||
node-version: 12.x | ||
- uses: actions/cache@70655ec | ||
name: Load Yarn cache | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install --ignore-scripts | ||
name: Install dependencies | ||
- run: yarn ci | ||
name: Run integration tests | ||
- uses: coverallsapp/github-action@832e70b | ||
name: Report code coverage | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: 8398a7/action-slack@78391c2 | ||
name: Notify on Slack | ||
if: always() # Pick up events even if the job fails or is canceled. | ||
with: | ||
status: ${{ job.status }} | ||
author_name: Continuous Integration | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
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,7 @@ | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
.env | ||
yarn-error.log | ||
# Docker containers with persistance | ||
.volumes/ |
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 @@ | ||
**/*.test.ts | ||
tsconfig.json | ||
.env | ||
.volumes/ | ||
yarn-error.log | ||
.github/** | ||
src/** | ||
coverage/ | ||
.dependabot/ |
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 François Best <francois.best@chiffre.io> | ||
|
||
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,13 @@ | ||
# @chiffre/template-library | ||
|
||
[![NPM](https://img.shields.io/npm/v/@chiffre/template-library?color=red)](https://www.npmjs.com/package/@chiffre/template-library) | ||
[![MIT License](https://img.shields.io/github/license/chiffre-io/template-library.svg?color=blue)](https://github.com/chiffre-io/template-library/blob/next/LICENSE) | ||
[![Continuous Integration](https://github.com/chiffre-io/template-library/workflows/Continuous%20Integration/badge.svg?branch=next)](https://github.com/chiffre-io/template-library/actions) | ||
[![Coverage Status](https://coveralls.io/repos/github/chiffre-io/template-library/badge.svg?branch=next)](https://coveralls.io/github/chiffre-io/template-library?branch=next) | ||
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=chiffre-io/template-library)](https://dependabot.com) | ||
|
||
Template for Chiffre libraries | ||
|
||
## License | ||
|
||
[MIT](https://github.com/chiffre-io/template-library/blob/next/LICENSE) - Made with ❤️ by [François Best](https://francoisbest.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,89 @@ | ||
{ | ||
"name": "@chiffre/template-library", | ||
"version": "0.0.0-semantically-released", | ||
"description": "Template for Chiffre libraries", | ||
"main": "dist/index.js", | ||
"license": "MIT", | ||
"author": { | ||
"name": "François Best", | ||
"email": "francois.best@chiffre.io", | ||
"url": "https://chiffre.io" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/chiffre-io/template-library" | ||
}, | ||
"keywords": [ | ||
"chiffre", | ||
"template" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"test": "jest --coverage", | ||
"test:watch": "jest --watch", | ||
"build:clean": "rm -rf ./dist", | ||
"build:ts": "tsc", | ||
"build": "run-s build:clean build:ts", | ||
"ci": "run-s build test" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@commitlint/config-conventional": "^8.3.4", | ||
"@types/jest": "^25.1.4", | ||
"@types/node": "^13.9.1", | ||
"commitlint": "^8.3.5", | ||
"husky": "^4.2.3", | ||
"jest": "^25.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"ts-jest": "^25.2.1", | ||
"ts-node": "^8.6.2", | ||
"typescript": "^3.8.3" | ||
}, | ||
"jest": { | ||
"verbose": true, | ||
"preset": "ts-jest/presets/js-with-ts", | ||
"testEnvironment": "node" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
], | ||
"rules": { | ||
"type-enum": [ | ||
2, | ||
"always", | ||
[ | ||
"build", | ||
"chore", | ||
"ci", | ||
"clean", | ||
"doc", | ||
"feat", | ||
"fix", | ||
"perf", | ||
"ref", | ||
"revert", | ||
"style", | ||
"test" | ||
] | ||
], | ||
"subject-case": [ | ||
0, | ||
"always", | ||
"sentence-case" | ||
], | ||
"body-leading-blank": [ | ||
2, | ||
"always", | ||
true | ||
] | ||
} | ||
} | ||
} |
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 @@ | ||
import hello from './index' | ||
|
||
test('testing works', () => { | ||
expect(hello('World')).toEqual('Hello, World !') | ||
}) |
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 @@ | ||
export default (name: string) => `Hello, ${name} !` |
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,33 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"target": "es2018", | ||
"lib": ["DOM"], | ||
"module": "commonjs", | ||
"declaration": true, | ||
"outDir": "./dist", | ||
"rootDir": "./src", | ||
"esModuleInterop": true, | ||
|
||
// Strict Type-Checking Options | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"strictPropertyInitialization": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
|
||
// Additional Checks | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
|
||
// Experimental Options | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true | ||
}, | ||
"include": ["./src/**/*.ts"], | ||
"exclude": ["./src/**/*.test.ts", "./dist", "./node_modules"] | ||
} |
Oops, something went wrong.