Skip to content

Commit 94ac403

Browse files
committed
Initial commit
0 parents  commit 94ac403

25 files changed

+10164
-0
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"project": "./tsconfig.json"
6+
},
7+
"plugins": ["@typescript-eslint", "prettier"],
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/eslint-recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"prettier"
13+
],
14+
"env": {
15+
"jest": true
16+
},
17+
"rules": {
18+
"no-console": 1, // Means warning
19+
"prettier/prettier": 2, // Means error
20+
"@typescript-eslint/ban-ts-comment": "off",
21+
"@typescript-eslint/no-floating-promises": ["error"],
22+
"@typescript-eslint/no-misused-promises": ["error"],
23+
"@typescript-eslint/promise-function-async": ["error"],
24+
"@typescript-eslint/require-await": ["error"],
25+
// note you must disable the base rule as it can report incorrect errors
26+
"no-return-await": "off",
27+
"@typescript-eslint/return-await": ["error"],
28+
// Don't allow awaiting non-Promises
29+
"@typescript-eslint/await-thenable": "error"
30+
},
31+
"ignorePatterns": ["dist", "cdk.out"]
32+
}

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build - CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Use Node.js 16
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16
22+
23+
- name: Install Modules
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Build Docs
30+
run: npm run build:docs
31+
32+
- name: Lint
33+
run: npm run lint
34+
35+
- name: Test
36+
run: npm run test

.github/workflows/docs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Docs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Use Node.js 16
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16
20+
21+
- name: Install Modules
22+
run: npm ci
23+
24+
- name: Build Docs
25+
run: npm run build:docs
26+
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./docs

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Package and Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Use Node.js 16
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
19+
- name: Use the Release Tag Version
20+
run: |
21+
npm version from-git --allow-same-version --no-git-tag-version
22+
23+
- name: Install Modules
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Lint
30+
run: npm run lint
31+
32+
- name: Test
33+
run: npm run test
34+
35+
- name: NPM registry authentication
36+
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPMJSORG_PUBLISH_TOKEN }}
37+
38+
- name: Publish with CLI to Code Artifact
39+
run: |
40+
npm publish --access public --ignore-scripts

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.idea/
2+
node_modules
3+
dist/
4+
*.tsbuildinfo
5+
*.log
6+
.nyc_output/
7+
coverage/
8+
.DS_Store

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.17.1

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 100
6+
}

.vscode/settings.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"files.exclude": {
3+
// "**/node_modules/*": true,
4+
// "cdk.out": true
5+
// "node_modules": true,
6+
// "**/node_modules": true
7+
},
8+
"editor.defaultFormatter": "esbenp.prettier-vscode",
9+
"editor.formatOnSave": true,
10+
"editor.insertSpaces": true,
11+
"editor.tabSize": 2,
12+
"files.associations": {
13+
"Dockerfile*": "dockerfile"
14+
},
15+
"[typescript]": {
16+
"editor.defaultFormatter": "esbenp.prettier-vscode"
17+
},
18+
"yaml.customTags": [
19+
"!And",
20+
"!And sequence",
21+
"!If",
22+
"!If sequence",
23+
"!Not",
24+
"!Not sequence",
25+
"!Equals",
26+
"!Equals sequence",
27+
"!Or",
28+
"!Or sequence",
29+
"!FindInMap",
30+
"!FindInMap sequence",
31+
"!Base64",
32+
"!Join",
33+
"!Join sequence",
34+
"!Cidr",
35+
"!Ref",
36+
"!Sub",
37+
"!Sub sequence",
38+
"!GetAtt",
39+
"!GetAZs",
40+
"!ImportValue",
41+
"!ImportValue sequence",
42+
"!Select",
43+
"!Select sequence",
44+
"!Split",
45+
"!Split sequence"
46+
],
47+
"[xml]": {
48+
"editor.defaultFormatter": "DotJoshJohnson.xml"
49+
}
50+
}

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributor Code of Conduct
2+
3+
The Shutterstock team is committed to fostering a welcoming community.
4+
5+
This project is governed by Shutterstock’s [Code of Conduct](https://github.com/shutterstock/code-of-conduct). All contributors and participants agree to abide by its terms.

0 commit comments

Comments
 (0)