Skip to content

Commit

Permalink
fixup!: add bundle generation
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobJingleheimer committed Dec 16, 2024
1 parent 05054f7 commit 0b39684
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches: ["main"]
paths: ["recipes/**"]
pull_request:
types: [closed]
paths: ["recipes/**"]
branches: ["main"]
paths: ["recipes/**"]
types: [closed]

jobs:
publish:
Expand Down Expand Up @@ -39,10 +39,11 @@ jobs:
with:
node-version: node
cache: 'npm'
- name: Install "codemod" binary
run: npm install codemod

- name: Run publish codemod
- name: Install dependencies
run: npm ci --include="optional"

- name: Generate bundle & publish to codemod registry
run: |
if [ -n "$CODEMOD_STATUS" ]; then
echo "Modified files: $CODEMOD_FILES"
Expand All @@ -51,6 +52,7 @@ jobs:
DIR=$(dirname "$FILE")
echo "Checking codemod: $DIR"
cd "$ROOT_DIR/$DIR"
npx esbuild --bundle --platform=node --outfile=bundle.js
npx codemod publish
echo "Codemod published"
done
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"@types/node": "^22.10.1",
"typescript": "^5.7.2"
},
"optionalDependencies": {
"codemod": "~0.14.0",
"esbuild": "~0.24.0"
},
"workspaces": [
"./recipes/*"
]
Expand Down

0 comments on commit 0b39684

Please sign in to comment.