Skip to content

Commit

Permalink
chore(deps|ci): better workflow and bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nekomeowww committed Nov 25, 2024
1 parent 011e771 commit 9abd555
Show file tree
Hide file tree
Showing 9 changed files with 351 additions and 27 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ jobs:
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Copy manifest
run: cp manifest.json dist/manifest.json

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
# Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead.
main.js
manifest.json

# Exclude sourcemaps
*.map
Expand Down
9 changes: 8 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import builtins from 'builtin-modules'
import { defineBuildConfig } from 'unbuild'

import { generateObsidianPluginManifest } from './scripts/manifest'

export default defineBuildConfig({
outDir: './dist',
sourcemap: true,
Expand Down Expand Up @@ -35,7 +37,7 @@ export default defineBuildConfig({
output: {
dir: './dist',
format: 'cjs',
sourcemap: true,
sourcemap: 'inline',
entryFileNames: 'main.js',
},
// required for unocss, ofetch, etc.
Expand All @@ -44,4 +46,9 @@ export default defineBuildConfig({
// by esbuild
inlineDependencies: true,
},
hooks: {
'build:done': async () => {
await generateObsidianPluginManifest()
},
},
})
7 changes: 7 additions & 0 deletions bump.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'bumpp'

export default defineConfig({
recursive: true,
commit: 'release: v%s',
sign: true,
})
16 changes: 10 additions & 6 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ dictionaryDefinitions: []
dictionaries: []
words:
- antfu
- Astro
- Attributify
- bumpp
- codemirror
- collab
- easytag
- emittypes
- iconify
- lezer
- Logseq
- nolebase
- Nólëbase
- ofetch
- preflights
- tailwindcss
- unocss
- vueuse
- Astro
- Attributify
- easytag
- emittypes
- Logseq
- preflights
ignoreWords: []
import: []
10 changes: 0 additions & 10 deletions manifest.json

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"cleanup": "rm -rf ./main.js && rm -rf ./main.js.map",
"build": "unbuild && pnpm run cleanup && pnpm run copy",
"copy": "cp ./dist/main.js ./main.js && cp ./dist/main.js.map ./main.js.map",
"copy": "cp ./dist/main.js ./main.js && cp ./dist/manifest.json ./manifest.json",
"lint": "eslint --cache .",
"lint:fix": "eslint --cache --fix ."
},
Expand All @@ -43,10 +43,12 @@
"@unocss/transformer-directives": "^0.64.1",
"@unocss/transformer-variant-group": "^0.64.1",
"builtin-modules": "^3.3.0",
"bumpp": "^9.8.1",
"eslint": "^9.15.0",
"magic-string": "^0.30.13",
"obsidian": "^1.7.2",
"ofetch": "^1.4.1",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"unbuild": "^2.0.0",
"unocss": "^0.64.1"
Expand Down
Loading

0 comments on commit 9abd555

Please sign in to comment.