-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to TS project #81
Changes from 16 commits
0d45671
1ddf419
109304e
55840c2
77821de
7f8b8b9
3825340
eebbaef
3f3e322
6b09b42
ec2574e
a40a545
ae6cbb7
0686ff0
eee9971
41d719c
e8ff08f
dd9a10d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/base", | ||
"name": "Node.js", | ||
"image": "mcr.microsoft.com/devcontainers/typescript-node:16", | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/pnpm:2": {} | ||
}, | ||
"customizations": { | ||
"codespaces": { | ||
"openFiles": ["README.md", "CONTRIBUTING.md"] | ||
}, | ||
"vscode": { | ||
"extensions": [ | ||
"lizebang.bash-extension-pack", | ||
"EditorConfig.EditorConfig", | ||
"GitHub.vscode-github-actions" | ||
] | ||
"extensions": ["EditorConfig.EditorConfig"] | ||
} | ||
}, | ||
// https://webinstall.dev/ | ||
"postCreateCommand": "curl -sS https://webi.sh/shfmt | sh && curl -sS https://webi.sh/shellcheck | sh" | ||
"postCreateCommand": ".devcontainer/postCreate.sh", | ||
"remoteUser": "node" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
pnpm i |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
action.yml linguist-detectable | ||
|
||
# This makes the newlines behave correctly in weird situations like running a | ||
# Windows-mounted CRLF file from within a WSL shell that expects LF. | ||
*.sh eol=lf | ||
dist/* binary | ||
tsconfig.json linguist-language=JSON-With-Comments |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Check dist/ | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
|
||
jobs: | ||
check-dist: | ||
name: Check dist/ | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Rebuild dist/ | ||
run: | | ||
pnpm build | ||
pnpm package | ||
|
||
- name: Compare diff | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "Detected uncommitted changes after build. See status below:" | ||
git diff | ||
exit 1 | ||
fi | ||
id: diff | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
with: | ||
name: dist | ||
path: dist/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- run: pnpm build | ||
- run: pnpm package | ||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Upload Coverage Report | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
format: | ||
name: Check Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- run: pnpm format-check |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: Update tags | ||
on: | ||
release: | ||
types: [released] | ||
concurrency: | ||
group: update-tags | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
update-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
source-tag: ${{ github.event.release.tag_name }} | ||
name: Update tags | ||
on: | ||
release: | ||
types: [released] | ||
concurrency: | ||
group: update-tags | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
update-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
source-tag: ${{ github.event.release.tag_name }} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like to use https://github.com/github/gitignore/blob/main/Node.gitignore since it's "official" but that's just me 😊 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, besides the fact that it ignores |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
/lib/ | ||
/coverage/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/node_modules/ | ||
/coverage/ | ||
/dist/ | ||
/lib/ | ||
pnpm-lock.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"printWidth": 88, | ||
"trailingComma": "all" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
**Thanks for taking the time to contribute! ❤️** | ||
|
||
All types of contributions are encouraged and valued, no matter if it's a bug | ||
report 🐛, a feature request 💡, or a Pull Request 🚀. | ||
|
||
- **❓ I have a question:** [Open a Q&A Discussion] | ||
- **🐛 I found a bug:** [Open an Issue] | ||
- **💡 I have an idea:** [Open an Idea Discussion] | ||
- **💻 I want to code:** See below | ||
|
||
## Contributing code | ||
|
||
1. 🔀 Fork the repo | ||
2. 💻 Open the repo in your editor | ||
3. 👨💻 Add your changes to your workspace | ||
4. 🔖 Commit & push your changes | ||
5. 🔁 Open a PR to get your changes merged | ||
6. 🧪 Let the tests run to make sure everything works | ||
7. 🚀 Profit! | ||
|
||
🚀 For a seamless coding experience, we recommend using VS Code or GitHub | ||
Codespaces as your editor! With VS Code's extensions and customizable settings, | ||
you can tailor your environment to suit your preferences. 🌟 Plus, for GitHub | ||
Codespaces users, we provide a `devcontainer.json` config for a ready-to-use | ||
development environment. 🛠️ Enhance your coding productivity and enjoyment with | ||
these powerful editors! 😊 | ||
|
||
We use [EditorConfig] to specify the spacing and file conventions for this | ||
project. Make sure you _try_ to conform with it. Editors like VS Code have | ||
extensions that will do this automatically for you! 😉 | ||
|
||
<!-- prettier-ignore-start --> | ||
[open an issue]: https://github.com/spenserblack/actions-wiki/issues/new | ||
[open a Q&A discussion]: https://github.com/spenserblack/actions-wiki/discussions/new?category=q-a | ||
[open an idea discussion]: https://github.com/spenserblack/actions-wiki/discussions/new?category=ideas | ||
[editorconfig]: https://editorconfig.org/ | ||
<!-- prettier-ignore-end --> | ||
**Thanks for taking the time to contribute! ❤️** | ||
|
||
All types of contributions are encouraged and valued, no matter if it's a bug | ||
report 🐛, a feature request 💡, or a Pull Request 🚀. | ||
|
||
- **❓ I have a question:** [Open a Q&A Discussion][new-qa] | ||
- **🐛 I found a bug:** [Open an Issue][new-issue] | ||
- **💡 I have an idea:** [Open an Idea Discussion][new-idea] | ||
- **💻 I want to code:** See below | ||
|
||
## Contributing code | ||
|
||
1. 🔀 Fork the repo | ||
2. 💻 Open the repo in your editor | ||
3. 👨💻 Add your changes to your workspace | ||
4. 🔖 Commit & push your changes | ||
5. 🔁 Open a PR to get your changes merged | ||
6. 🧪 Let the tests run to make sure everything works | ||
7. 🚀 Profit! | ||
|
||
🚀 For a seamless coding experience, we recommend using VS Code or GitHub | ||
Codespaces as your editor! With VS Code's extensions and customizable settings, | ||
you can tailor your environment to suit your preferences. 🌟 Plus, for GitHub | ||
Codespaces users, we provide a `devcontainer.json` config for a ready-to-use | ||
development environment. 🛠️ Enhance your coding productivity and enjoyment with | ||
these powerful editors! 😊 | ||
|
||
We use [EditorConfig][editorconfig] to specify the spacing and file conventions for this | ||
project. Make sure you _try_ to conform with it. Editors like VS Code have | ||
extensions that will do this automatically for you! 😉 | ||
|
||
[new-issue]: https://github.com/spenserblack/actions-wiki/issues/new | ||
[new-qa]: https://github.com/spenserblack/actions-wiki/discussions/new?category=q-a | ||
[new-idea]: https://github.com/spenserblack/actions-wiki/discussions/new?category=ideas | ||
[editorconfig]: https://editorconfig.org/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just one command after all 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a bit of future-proofing for when more post-create commands need to be added. Plus, it's a cheat to add a bit more language diversity to this project 😉