这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
53eb56e
chore: add new npm script `check` & `fix`
phanect Aug 24, 2024
1e08048
ci: add GitHub Actions to `build` & `check`
phanect Aug 24, 2024
18fd88c
chore: update package-lock.json
phanect Aug 24, 2024
e60c6c1
refactor: convert JavaScript files to TypeScript
phanect Aug 16, 2024
9e6daa9
chore: do not check dist/ dir
phanect Aug 25, 2024
bfa4446
fix: typos in property name
phanect Aug 25, 2024
06c3979
refactor: add typings
phanect Aug 25, 2024
35b7573
chore: replace `rehype-plugin-image-native-lazy-loading` with our own
phanect Aug 25, 2024
daa2017
style: format
phanect Aug 25, 2024
dfc796c
chore: update package-lock.json
phanect Aug 25, 2024
d067c80
ci: remove duplicate `npm run check` command from `build` job
phanect Aug 28, 2024
4254a60
Merge pull request #499 from phanect/feat-gha
prototypa Aug 29, 2024
0b23b38
Fix code style issues found in tsconfig.json
prototypa Aug 29, 2024
bfa0568
Regenerate package-lock.json and update version
prototypa Aug 29, 2024
72ad50d
Fix error: Cannot find module @rollup/rollup-linux-x64-gnu
prototypa Aug 29, 2024
18add82
Fix error: Cannot find module @rollup/rollup-linux-x64-gnu
prototypa Aug 29, 2024
d0299e9
Merge branch 'main' into feat-typescriptify
prototypa Aug 29, 2024
c047ce6
Merge pull request #501 from phanect/feat-typescriptify
prototypa Aug 29, 2024
07d49e1
Regenerate package-lock.json
prototypa Aug 29, 2024
76e8193
Update dependencies (Astro v4.15.1)
prototypa Aug 29, 2024
b9977f0
Rename astro.config.mjs to astro.config.ts
prototypa Aug 29, 2024
4cfffd2
Merge pull request #506 from onwidget/prototypa-patch-1
prototypa Aug 29, 2024
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
41 changes: 41 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: GitHub Actions

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18
- 20
- 22
steps:
- uses: actions/checkout@v4
- name: Use Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
# - run: npm test

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run check
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Inside **AstroWind** template, you'll see the following folders and files:
│ ├── config.yaml
│ └── navigation.js
├── package.json
├── astro.config.mjs
├── astro.config.ts
└── ...
```

Expand Down
9 changes: 3 additions & 6 deletions astro.config.mjs → astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown';
import icon from 'astro-icon';
import compress from 'astro-compress';
import type { AstroIntegration } from 'astro';

import astrowind from './vendor/integration';

import {
readingTimeRemarkPlugin,
responsiveTablesRehypePlugin,
lazyImagesRehypePlugin,
} from './src/utils/frontmatter.mjs';
import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin, lazyImagesRehypePlugin } from './src/utils/frontmatter';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const hasExternalScripts = false;
const whenExternalScripts = (items = []) =>
const whenExternalScripts = (items: (() => AstroIntegration) | (() => AstroIntegration)[] = []) =>
hasExternalScripts ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : [];

export default defineConfig({
Expand Down
Loading