Skip to content

Commit 2a37a9f

Browse files
committed
Initial commit with boilerplate
1 parent 0706b4b commit 2a37a9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+10199
-0
lines changed

.clasp.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"rootDir": "dist",
3+
"scriptId": "1EBKJNiPs_XxntcBHxMKJgfBr7089AHhT3boz7_Lkc6AD0hjsQavkIjxz",
4+
"parentId": [
5+
"1UAVn7sP1pTutyOM2i95jxQz6sjVr2ZrxhG82uLIdd70"
6+
]
7+
}

.clasp.json.SAMPLE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"rootDir": "dist",
3+
"scriptId": "...add scriptId here...",
4+
"parentId": [
5+
"...spreadsheet/doc url ID here..."
6+
]
7+
}

.claspignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
main.js
2+
*-impl.html

.eslintignore

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

.eslintrc.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"extends": [
5+
"airbnb-base",
6+
"plugin:prettier/recommended",
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"plugins": ["prettier", "googleappsscript"],
11+
"env": {
12+
"googleappsscript/googleappsscript": true
13+
},
14+
"rules": {
15+
"prettier/prettier": "error",
16+
"camelcase": "warn",
17+
"import/prefer-default-export": "warn",
18+
"import/no-extraneous-dependencies": "warn",
19+
"prefer-object-spread": "warn",
20+
"import/extensions": [
21+
"error",
22+
"ignorePackages",
23+
{
24+
"js": "never",
25+
"ts": "never"
26+
}
27+
]
28+
},
29+
"ignorePatterns": ["dist", ".eslintrc.json"],
30+
"settings": {
31+
"import/resolver": {
32+
"node": {
33+
"extensions": [".js", ".ts"]
34+
}
35+
}
36+
}
37+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Local integration tests - Basic Version
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
basic-integration-test:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [macos-12, macos-13, windows-2022]
13+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
14+
node-version: [18, 20]
15+
timeout-minutes: 8
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Install packages
23+
run: yarn install
24+
- name: Allow running mkcert on Mac
25+
run: sudo security authorizationdb write com.apple.trust-settings.admin allow
26+
if: runner.os == 'MacOS'
27+
- name: Install mkcert
28+
run: brew install mkcert
29+
if: runner.os == 'MacOS'
30+
- name: Run mkcert setup [mkcert -install]
31+
run: mkcert -install
32+
if: runner.os == 'MacOS'
33+
- name: Install https cert [yarn setup:https]
34+
run: yarn setup:https
35+
if: runner.os == 'MacOS'
36+
- run: |
37+
mkdir certs
38+
.\scripts\generate-cert.ps1
39+
shell: pwsh
40+
if: runner.os == 'Windows'
41+
- name: Run integration tests
42+
run: yarn test:integration
43+
shell: bash

.github/workflows/lint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: macos-13
8+
timeout-minutes: 8
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Use Node.js ${{ matrix.node-version }}
12+
uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
- name: Install packages
16+
run: yarn install
17+
- name: Run lint
18+
run: yarn lint

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# npm
2+
node_modules
3+
4+
# clasp files
5+
creds.json
6+
7+
# certs
8+
*.pem
9+
certs/
10+
11+
# build
12+
dist/
13+
14+
# mac
15+
.DS_Store
16+
17+
#secret
18+
.env

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/gallium

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5"
4+
}

0 commit comments

Comments
 (0)