Skip to content

Commit b3f5625

Browse files
author
Joel Lefkowitz
committed
Move metadata to spago.yaml
1 parent a7affea commit b3f5625

14 files changed

+531
-1482
lines changed

.cspell.json

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
{
22
"language": "en",
3-
"ignorePaths": [
4-
".git",
5-
".gitignore",
6-
".husky",
7-
".spago",
8-
"*.aff",
9-
"*.dic",
10-
"coverage",
11-
"dist",
12-
"generated-docs",
13-
"output",
14-
"yarn-error.log"
3+
"dictionaries": [
4+
"aws",
5+
"bash",
6+
"en-gb",
7+
"fullstack",
8+
"misc",
9+
"softwareTerms"
1510
],
16-
"dictionaries": ["bash", "en-gb", "misc", "node", "softwareTerms"],
11+
"ignorePaths": [".git", "dicts"],
1712
"words": [
1813
"bumpversion",
1914
"codacy",
15+
"corepack",
16+
"dhall",
2017
"foldl",
2118
"forall",
19+
"giphy",
2220
"joellefkowitz",
2321
"lefkowitz",
2422
"ncols",
23+
"newtype",
2524
"nrows",
2625
"outfile",
2726
"purescript",
2827
"purs",
2928
"purty",
29+
"repr",
3030
"spago",
31+
"stringutils",
32+
"trufflehog",
3133
"unfoldable"
3234
]
3335
}

.github/actions/install/action.yml

+13-20
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,26 @@ runs:
1010
using: composite
1111
steps:
1212
- name: Checkout the source code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

15-
- name: Fetch yarn's cache directory path
16-
id: yarn-cache-dir-path
15+
- name: Enable corepack
1716
shell: bash
18-
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV
19-
20-
- name: Set up yarn package caching
21-
uses: actions/cache@v3
22-
id: yarn-cache
23-
with:
24-
path: ${{ env.YARN_CACHE_DIR }}
25-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
26-
restore-keys: |
27-
${{ runner.os }}-yarn-
17+
run: corepack enable
2818

2919
- name: Set the node version
30-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
3121
with:
3222
node-version: ${{ inputs.node-version }}
23+
cache: yarn
24+
25+
- name: Install yarn dependencies
26+
shell: bash
27+
run: yarn install --immutable
3328

34-
- name: Install node dependencies
29+
- name: Install spago dependencies
3530
shell: bash
36-
run: |
37-
yarn install --frozen-lockfile
38-
yarn global add [email protected] purescript
31+
run: yarn spago install
3932

40-
- name: Install PureScript dependencies
33+
- name: Install trufflehog3
4134
shell: bash
42-
run: spago install
35+
run: pip install trufflehog3

.github/workflows/docs.yml

+7-10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ on:
55
tags:
66
- "*.*.*"
77

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
138
concurrency:
149
group: "pages"
1510
cancel-in-progress: false
@@ -19,7 +14,7 @@ jobs:
1914
runs-on: ubuntu-latest
2015
steps:
2116
- name: Checkout the source code
22-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
2318

2419
- name: Install dependencies
2520
uses: ./.github/actions/install
@@ -28,21 +23,23 @@ jobs:
2823
uses: actions/configure-pages@v4
2924

3025
- name: Build the docs
31-
32-
# Use npx to invoke the local spago cli
33-
run: npx spago docs
26+
run: yarn spago docs
3427

3528
- name: Upload the artifacts
3629
uses: actions/upload-pages-artifact@v3
3730
with:
3831
path: "generated-docs/html"
3932

4033
deploy:
34+
permissions:
35+
pages: write
36+
id-token: write
37+
4138
runs-on: ubuntu-latest
4239
needs: build
4340

4441
environment:
45-
name: github-pages
42+
name: Pages
4643
url: ${{ steps.deployment.outputs.page_url }}
4744

4845
steps:

.github/workflows/review.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout the source code
10-
uses: actions/checkout@v3
10+
uses: actions/checkout@v4
1111

1212
- name: Install dependencies
1313
uses: ./.github/actions/install
@@ -16,4 +16,4 @@ jobs:
1616
run: npm run lint
1717

1818
- name: Run tests
19-
run: spago test
19+
run: yarn spago test

.gitignore

+4-25
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,9 @@
1+
.DS_Store
2+
.psc-ide-port
13
.spago/
4+
.yarn/
25
bower_components/
3-
node_modules/
4-
venv/
5-
6-
build/
7-
coverage/
8-
dist/
96
generated-docs/
7+
node_modules/
108
output/
11-
tests_output/
12-
13-
__pycache__/
14-
.mypy_cache/
15-
.nx/
16-
.pytest_cache/
17-
.terraform/
18-
19-
*.coverage
20-
*.dblite
21-
*.egg-info/
22-
*.env*
23-
*.o
24-
*.pyc
25-
*.types
26-
27-
.DS_Store
28-
.psc-ide-port
29-
.terraform.lock.hcl
309
yarn-error.log

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
npm run lint
2-
spago test
2+
yarn spago test

.trufflehog3.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
severity: low
2+
exclude:
3+
- message: Giphy links
4+
pattern: media\.giphy\.com
5+
6+
- message: Shield links
7+
pattern: img\.shields\.io
8+
9+
- message: Codacy references
10+
pattern: "codacy_id:"
11+
12+
- message: Dictionaries
13+
paths:
14+
- en_US.aff
15+
16+
- message: Dependencies
17+
paths:
18+
- node_modules
19+
- .spago
20+
21+
- message: Package management
22+
paths:
23+
- packages.dhall
24+
- purs.json
25+
- spago.yaml
26+
27+
- message: Tooling outputs
28+
paths:
29+
- generated-docs
30+
- output
31+
- spago.lock
32+
- yarn-error.log
33+
- yarn.lock

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,29 @@ Documentation and more detailed examples are hosted on [Github Pages](https://jo
1818

1919
## Tooling
2020

21+
### Dependencies
22+
23+
To install dependencies:
24+
25+
```bash
26+
yarn install
27+
yarn spago install
28+
```
29+
2130
### Tests
2231

2332
To run tests:
2433

2534
```bash
26-
spago test
35+
yarn spago test
2736
```
2837

2938
### Documentation
3039

3140
To generate the documentation locally:
3241

3342
```bash
34-
spago docs
43+
yarn spago docs
3544
```
3645

3746
### Linters
@@ -70,8 +79,8 @@ bump2version patch
7079

7180
Lots of love to the open source community!
7281

73-
<p align='center'>
82+
<div align='center'>
7483
<img width=200 height=200 src='https://media.giphy.com/media/osAcIGTSyeovPq6Xph/giphy.gif' alt='Be kind to your mind' />
7584
<img width=200 height=200 src='https://media.giphy.com/media/KEAAbQ5clGWJwuJuZB/giphy.gif' alt='Love each other' />
7685
<img width=200 height=200 src='https://media.giphy.com/media/WRWykrFkxJA6JJuTvc/giphy.gif' alt="It's ok to have a bad day" />
77-
</p>
86+
</div>

docs/images/.gitkeep

Whitespace-only changes.

package.json

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
{
2-
"metadata": {
3-
"publisher": "Pursuit",
4-
"languages": [
5-
"PureScript"
6-
],
7-
"frameworks": [],
8-
"paradigms": [
9-
"Functional"
10-
],
11-
"lifecycle": "Pre-alpha"
12-
},
2+
"packageManager": "[email protected]",
133
"scripts": {
14-
"prepare": "husky install",
4+
"postinstall": "husky",
155
"format": "prettier . --write && echo src test | xargs -n1 npx purty --write",
16-
"lint": "cspell . --dot && eslint . --fix --no-error-on-unmatched-pattern"
6+
"lint": "cspell . --dot --gitignore && eslint . --fix --no-error-on-unmatched-pattern && trufflehog3"
177
},
188
"resolutions": {
199
"string-width": "4.2.3",

0 commit comments

Comments
 (0)