Skip to content

Commit d23e193

Browse files
committed
chore: update gh actions to format on release commits
1 parent 22ad069 commit d23e193

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
format:
14+
build:
1515
runs-on: ubuntu-latest
1616
permissions:
1717
# Give the default GITHUB_TOKEN write permission to commit and push the
@@ -31,16 +31,8 @@ jobs:
3131
run: npm ci
3232
- name: Build
3333
run: npm run @ci:build
34-
- name: Format Code
35-
run: npm run @ci:format
36-
- name: Commit changes
37-
uses: stefanzweifel/git-auto-commit-action@v5
38-
with:
39-
commit_message: "[ci] format"
40-
commit_user_name: "github-actions[bot]"
41-
commit_user_email: "github-actions[bot]@users.noreply.github.com"
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Lint Code
35+
run: npm run @ci:lint
4436
test:
4537
runs-on: ubuntu-latest
4638
name: "test: node@${{ matrix.node }}"
@@ -66,7 +58,7 @@ jobs:
6658
token: ${{ secrets.CODECOV_TOKEN }}
6759
release:
6860
runs-on: ubuntu-latest
69-
needs: [format, test]
61+
needs: [build, test]
7062
if: "${{ github.repository_owner == 'marko-js' && github.event_name == 'push' }}"
7163
steps:
7264
- name: Checkout code

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
],
77
"scripts": {
88
"@ci:build": "npm run build",
9-
"@ci:format": "eslint --format unix --fix . && prettier . --write --with-node-modules --log-level=warn",
9+
"@ci:lint": "eslint --format unix . && prettier . --check --with-node-modules --log-level=warn",
1010
"@ci:release": "npm run build && node scripts/pkg-override && changeset publish && node scripts/pkg-override && npm ci",
1111
"@ci:test": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" MARKO_DEBUG=1 c8 npm test",
12-
"@ci:version": "changeset version && npm i --package-lock-only",
12+
"@ci:version": "npm run build && npm run format && changeset version && npm i --package-lock-only",
1313
"build": "npm run build --ws && tsc -b tsconfig.build.json",
1414
"build:sizes": "node -r ~ts scripts/sizes",
1515
"change": "changeset add",

packages/marko/docs/fastify.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,24 @@ app.get("/", (request, reply) => {
4040

4141
await fastify.listen(3000);
4242
```
43+
4344
### Global Outputs
45+
4446
We can add global outputs from the server side using the reply object or fastify instance.
47+
4548
```javascript
46-
reply.locals.newProperty = 'Your value';
49+
reply.locals.newProperty = "Your value";
4750
```
4851

4952
To use this in marko components we just need to refer out.global
53+
5054
```marko
5155
$ const { newProperty } = $global;
5256
```
53-
To know more about sending the data to the browser checkout:
54-
### [Sending global data to browsers](https://markojs.com/docs/rendering/#sending-global-data-to-browsers)
57+
58+
To know more about sending the data to the browser checkout:
59+
60+
### [Sending global data to browsers](https://markojs.com/docs/rendering/#sending-global-data-to-browsers)
5561

5662
### BYOB (Bring your own bundler)
5763

0 commit comments

Comments
 (0)