Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
303e8e2dd2 | ||
|
|
c567a6a9d5 | ||
|
|
f92baf3b82 | ||
|
|
6680d464c3 | ||
|
|
b6a5460a04 | ||
|
|
84c408d149 | ||
|
|
53d366f6b6 | ||
|
|
6beca83fa3 |
@@ -7,7 +7,18 @@ concurrency:
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- "main"
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/deploy.yml'
|
||||||
|
- 'package.json'
|
||||||
|
- 'bun.lock'
|
||||||
|
- 'src/**'
|
||||||
|
- 'index.html'
|
||||||
|
- 'vite.config.ts'
|
||||||
|
- 'post-build.ts'
|
||||||
|
- 'tsconfig.*'
|
||||||
|
- 'env.d.ts'
|
||||||
|
- 'vite.d.ts'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -15,9 +26,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Bun
|
- name: Set up Bun
|
||||||
uses: https://github.com/oven-sh/setup-bun@v2
|
uses: actions/setup-bun@v2
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -41,18 +50,16 @@ jobs:
|
|||||||
name: "Deploy to Stapler"
|
name: "Deploy to Stapler"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
if: ${{ vars.STAPLER_TARGET != '' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download production files
|
- name: Download production files
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: production-files
|
name: production-files
|
||||||
path: ./dist
|
path: ./dist
|
||||||
- name: Compress production files
|
|
||||||
run: tar -czC dist -f dist.tar.gz .
|
|
||||||
- name: Upload to Stapler server
|
- name: Upload to Stapler server
|
||||||
run: |
|
uses: actions/stapler-deploy@v1
|
||||||
curl -s -X PUT --data-binary "@dist.tar.gz" \
|
with:
|
||||||
-H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \
|
path: dist
|
||||||
${{ vars.STAPLER_CURL_ARGS }} \
|
token: ${{ secrets.STAPLER_TOKEN }}
|
||||||
${{ vars.STAPLER_TARGET }}
|
target: ${{ github.repository }}
|
||||||
|
extra_curl_args: ${{ vars.STAPLER_CURL_ARGS }}
|
||||||
|
|||||||
+19
-12
@@ -4,7 +4,20 @@ concurrency:
|
|||||||
group: lint-${{ github.ref }}
|
group: lint-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/lint.yml'
|
||||||
|
- 'package.json'
|
||||||
|
- 'bun.lock'
|
||||||
|
- 'src/**'
|
||||||
|
- 'articles.example/**'
|
||||||
|
- '.oxlintrc.json'
|
||||||
|
- 'eslint.config.ts'
|
||||||
|
- 'tsconfig.*'
|
||||||
|
- 'env.d.ts'
|
||||||
|
- 'vite.d.ts'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-eslint:
|
lint-eslint:
|
||||||
@@ -12,9 +25,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Bun
|
- name: Set up Bun
|
||||||
uses: https://github.com/oven-sh/setup-bun@v2
|
uses: actions/setup-bun@v2
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -29,9 +40,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Bun
|
- name: Set up Bun
|
||||||
uses: https://github.com/oven-sh/setup-bun@v2
|
uses: actions/setup-bun@v2
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -41,14 +50,12 @@ jobs:
|
|||||||
- name: Run Oxlint
|
- name: Run Oxlint
|
||||||
run: bun run lint:oxlint
|
run: bun run lint:oxlint
|
||||||
|
|
||||||
type-check:
|
tsc:
|
||||||
name: Type Check
|
name: 'TypeScript'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Bun
|
- name: Set up Bun
|
||||||
uses: https://github.com/oven-sh/setup-bun@v2
|
uses: actions/setup-bun@v2
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"Vue.volar",
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"EditorConfig.EditorConfig",
|
|
||||||
"oxc.oxc-vscode",
|
|
||||||
"esbenp.prettier-vscode"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -31,8 +31,8 @@ node_modules: bun.lock
|
|||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: npm-install ## install project
|
install: npm-install ## install project
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: update
|
||||||
install: npm-update ## update project
|
update: npm-update ## update project
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: npm-run-build ## build static site in "dist"
|
build: npm-run-build ## build static site in "dist"
|
||||||
@@ -59,3 +59,11 @@ npm-update: ## npm update
|
|||||||
.PHONY: npm-run-%
|
.PHONY: npm-run-%
|
||||||
npm-run-%: node_modules ## npm run (script)
|
npm-run-%: node_modules ## npm run (script)
|
||||||
$(NPM) run $*
|
$(NPM) run $*
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: release-%
|
||||||
|
release-%: node_modules ## release major/minor/patch
|
||||||
|
$(NPM) pm version $* --no-git-tag-version || true
|
||||||
|
git add package.json
|
||||||
|
git commit -m "chore: release $$(cat package.json | jq -r .version)"
|
||||||
|
git tag "release/$$(cat package.json | jq -r .version)" -m "md-blog $$(cat package.json | jq -r .version)"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
|
"configVersion": 0,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "md-blog",
|
"name": "md-blog",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "md-blog",
|
"name": "md-blog",
|
||||||
"version": "1.9.2",
|
"version": "1.9.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": "https://git.klemek.fr/klemek/md-blog",
|
"repository": "https://git.klemek.fr/klemek/md-blog",
|
||||||
|
|||||||
+14
-1
@@ -18,7 +18,6 @@ export default ({ mode }: { mode: string }) => {
|
|||||||
|
|
||||||
return defineConfig({
|
return defineConfig({
|
||||||
plugins: [vue(), vueDevTools(), mdPlugin({ mode: [Mode.HTML] })],
|
plugins: [vue(), vueDevTools(), mdPlugin({ mode: [Mode.HTML] })],
|
||||||
base: process.env.VITE_BASE_URL,
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
@@ -29,5 +28,19 @@ export default ({ mode }: { mode: string }) => {
|
|||||||
'@components': fileURLToPath(new URL('./src/components', import.meta.url)),
|
'@components': fileURLToPath(new URL('./src/components', import.meta.url)),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
build: {
|
||||||
|
rolldownOptions: {
|
||||||
|
output: {
|
||||||
|
codeSplitting: {
|
||||||
|
groups: [
|
||||||
|
{
|
||||||
|
name: (moduleId: string) => moduleId.includes('node_modules') ? 'libs' : 'app',
|
||||||
|
maxSize: 1024 * 1024,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,26 +2,11 @@ declare module '*.md' {
|
|||||||
// "unknown" would be more detailed depends on how you structure frontmatter
|
// "unknown" would be more detailed depends on how you structure frontmatter
|
||||||
const attributes: Record<string, unknown>
|
const attributes: Record<string, unknown>
|
||||||
|
|
||||||
// When "Mode.TOC" is requested
|
|
||||||
const toc: { level: string; content: string }[]
|
|
||||||
|
|
||||||
// When "Mode.HTML" is requested
|
// When "Mode.HTML" is requested
|
||||||
const html: string
|
const html: string
|
||||||
|
|
||||||
// When "Mode.RAW" is requested
|
|
||||||
const raw: string
|
|
||||||
|
|
||||||
// When "Mode.React" is requested. VFC could take a generic like React.VFC<{ MyComponent: TypeOfMyComponent }>
|
|
||||||
import React from 'react'
|
|
||||||
const ReactComponent: React.VFC
|
|
||||||
|
|
||||||
// When "Mode.Vue" is requested
|
|
||||||
import { ComponentOptions, Component } from 'vue'
|
|
||||||
const VueComponent: ComponentOptions
|
|
||||||
const VueComponentWith: (components: Record<string, Component>) => ComponentOptions
|
|
||||||
|
|
||||||
// Modify below per your usage
|
// Modify below per your usage
|
||||||
export { attributes, toc, html, ReactComponent, VueComponent, VueComponentWith }
|
export { html }
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '*.vue'
|
declare module '*.vue'
|
||||||
|
|||||||
Reference in New Issue
Block a user