Skip to content
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

feat: Add scripts for stdlib format and stdlib doc #2225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ jobs:
- name: (stdlib) Check documentation
if: inputs.os != 'windows-latest'
run: |
grain doc stdlib -o stdlib --current-version=$(grain -v)
npm run stdlib doc
git diff --exit-code --name-only

# If we have a working grain CLI, we can run grainfmt on stdlib & tests
- name: (stdlib) Check formatting
if: inputs.os != 'windows-latest'
run: |
grain format stdlib -o stdlib
npm run stdlib format
grain format compiler/test/stdlib -o compiler/test/stdlib
git diff --exit-code --name-only
4 changes: 2 additions & 2 deletions stdlib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ If you want to contribute to the `stdlib`, please consider the guidelines [here]
To regenerate the `stdlib`` documentation you can run:

```sh
grain doc stdlib -o stdlib --current-version=$(grain -v)
npm run stdlib doc
```

To format the `stdlib` you can run:

```sh
grain format ./stdlib/ -o ./stdlib/
npm run stdlib format
```

To run the `stdlib` tests you can run:
Expand Down
4 changes: 3 additions & 1 deletion stdlib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"index.js"
],
"scripts": {
"clean": "del-cli \"**/*.wasm\" \"**/*.wat\" \"**/*.modsig\""
"clean": "del-cli \"**/*.wasm\" \"**/*.wat\" \"**/*.modsig\"",
"doc": "grain doc ./ -o ./ --current-version=$(grain -v)",
"format": "grain format ./ -o ./"
},
"dependencies": {},
"devDependencies": {
Expand Down
Loading