Skip to content

Commit 02af9b8

Browse files
Psl 1511 mvp remove bundling from the package (#25)
* update build pipeline * remove addon * update readme * ignore lib folder * update github actions * Build library and supporting storybook documentation * update readme * update api key in read me * Build library and supporting storybook documentation * update api autocomplete key * update api key in sb code snippets * add github workflows * update guthub actions * fix linting errors and update package-lock * add codeql analyze and diffend env vars * Build library and supporting storybook documentation * Revert "Build library and supporting storybook documentation" This reverts commit 73ff726. * Build library and supporting storybook documentation * fix jobs Co-authored-by: GitHub Actions <[email protected]>
1 parent 239bd1b commit 02af9b8

File tree

69 files changed

+5471
-11833
lines changed

Some content is hidden

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

69 files changed

+5471
-11833
lines changed

.diffend.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project_id: '7d7bd830-030a-446c-9c08-3a0e3c738f42'
2+
shareable_id: 'ac0d321f-b01a-4ede-8e19-ee6fce1668cc'
3+
shareable_key: 'e932639a-bc20-4cba-a79b-cf4ff2da3b94'

.eslintrc.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@
1515
"ecmaVersion": "latest",
1616
"project": "tsconfig.eslint.json"
1717
},
18-
"plugins": [
19-
"@typescript-eslint",
20-
"prettier"
21-
],
18+
"plugins": ["@typescript-eslint", "prettier"],
2219
"rules": {
2320
"prefer-const": "error",
2421
"@typescript-eslint/no-unused-vars": "off",
2522
"@typescript-eslint/no-unused-params": "off",
26-
"prettier/prettier": [
27-
"error"
28-
]
23+
"prettier/prettier": ["error"]
2924
},
3025
"overrides": [
3126
{
@@ -36,9 +31,5 @@
3631
}
3732
}
3833
],
39-
"ignorePatterns": [
40-
"*.config.js",
41-
"lib/**/*.js",
42-
"lib/*.d.ts"
43-
]
34+
"ignorePatterns": ["*.config.js", "lib/**/*.js", "lib/**/*.d.ts", "docs/**/*.js"]
4435
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: 'CodeQL'
13+
14+
on:
15+
push:
16+
branches: [master]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [master]
20+
schedule:
21+
- cron: '34 5 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: ['javascript']
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

.github/workflows/run-diffend.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run Diffend
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
- '!main'
8+
concurrency:
9+
group: run-diffend-${{ github.head_ref }}
10+
cancel-in-progress: true
11+
jobs:
12+
diffend:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v2
17+
- name: Set up node
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: '16.13.0'
21+
- name: Install Diffend (Mend)
22+
run: npm install -g https://my.diffend.io/releases/npm/stable.tgz
23+
- name: Install dependencies with Diffend
24+
run: diffend npm install

.github/workflows/run-lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Run lint
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
- '!main'
7+
concurrency:
8+
group: run-lint-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v2
16+
- name: Set up node
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '16.13.0'
20+
- name: Install dependencies
21+
run: npm install
22+
- name: Run lint
23+
run: npm run lint

.github/workflows/spell-check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Spell check
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
- '!main'
8+
concurrency:
9+
group: spell-check-${{ github.head_ref }}
10+
cancel-in-progress: true
11+
jobs:
12+
check:
13+
name: Run spell check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v2
18+
- name: Set up node
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '16.13.0'
22+
- name: Spell check
23+
run: npx cspell "**/*.{ts,tsx}"

.github/workflows/test-build.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@ on:
55
branches:
66
- '*'
77
- '!main'
8-
8+
concurrency:
9+
group: run-tests-and-build-${{ github.head_ref }}
10+
cancel-in-progress: true
911
jobs:
1012
test-storybook:
1113
timeout-minutes: 15
1214
runs-on: ubuntu-latest
1315
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
16+
- name: Check out code
17+
uses: actions/checkout@v2
18+
- name: Set up node
19+
uses: actions/setup-node@v2
1620
with:
1721
node-version: '16.13.0'
1822
- name: Install dependencies
1923
run: npm ci
20-
- name: Run All Storybook Tests
24+
- name: Run Tests
2125
run: npm run test-storybook:ci
22-
build:
26+
test-build-scripts:
2327
runs-on: ubuntu-latest
2428
needs: test-storybook
2529
steps:
@@ -29,15 +33,7 @@ jobs:
2933
node-version: '16.13.0'
3034
- name: Install
3135
run: npm ci
32-
- name: Build static storybook files for deploy to GitHub Pages
36+
- name: test run build-storybook without error
3337
run: npm run build-storybook
34-
- name: Generate library bundle ready for publishing
35-
run: npm run bundle
36-
- name: Commit changes
37-
uses: EndBug/add-and-commit@v9
38-
with:
39-
author_name: GitHub Actions
40-
author_email: [email protected]
41-
message: 'Build library bundle and supporting storybook documentation'
42-
add: '*'
43-
commit: --no-verify
38+
- name: test run compile without error
39+
run: npm run compile
Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
1-
name: Version and Release
1+
name: Version and Release and build storybook stories
22

33
on:
44
push:
55
branches:
66
- main
7-
87
jobs:
8+
build-storybook:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: '16.13.0'
15+
- name: Install
16+
run: npm ci
17+
- name: Build static storybook files for deploy to GitHub Pages
18+
run: npm run build-storybook
19+
- name: Commit changes
20+
uses: EndBug/add-and-commit@v9
21+
with:
22+
author_name: GitHub Actions
23+
author_email: [email protected]
24+
message: 'Build library and supporting storybook documentation'
25+
add: '*'
26+
commit: --no-verify
927
version-and-release:
1028
runs-on: ubuntu-latest
29+
needs: build-storybook
1130
env:
1231
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1332
steps:
1433
- uses: rymndhng/release-on-push-action@master
1534
with:
1635
tag_prefix: "v"
1736
bump_version_scheme: norelease
18-
release_name: "Release <RELEASE_TAG>"
37+
release_name: "Release <RELEASE_TAG>"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ out
8989

9090
# Nuxt.js build / generate output
9191
.nuxt
92-
build
92+
lib
9393

9494
# Gatsby files
9595
.cache/

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)