-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d46ec03
commit 7c0eeb0
Showing
27 changed files
with
760 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ tsconfig.tsbuildinfo | |
tsconfig.build.tsbuildinfo | ||
.tmp | ||
.tmp-* | ||
/test/**/test-results | ||
/test/**/.astro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"demo": "pnpm run --filter=demo.tutorialkit.dev dev", | ||
"demo:build": "pnpm run build && pnpm run --filter=demo.tutorialkit.dev build", | ||
"lint": "eslint \"{packages,docs,extensions,integration}/**/*\"", | ||
"test": "pnpm run --stream --filter=@tutorialkit/* test --run" | ||
"test": "CI=true pnpm run --stream --filter=@tutorialkit/* test" | ||
}, | ||
"license": "MIT", | ||
"packageManager": "[email protected]", | ||
|
@@ -30,6 +30,7 @@ | |
"eslint-plugin-astro": "^1.2.3", | ||
"husky": "^9.0.11", | ||
"is-ci": "^3.0.1", | ||
"playwright": "^1.46.0", | ||
"prettier": "^3.3.2", | ||
"prettier-plugin-astro": "^0.14.1", | ||
"tempfile": "^5.0.0" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import tutorialkit from '@tutorialkit/astro'; | ||
import { defineConfig } from 'astro/config'; | ||
|
||
export default defineConfig({ | ||
devToolbar: { enabled: false }, | ||
server: { port: 4329 }, | ||
integrations: [tutorialkit()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "@tutorialkit/test-ui", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"start": "astro dev", | ||
"preview": "astro build && astro preview", | ||
"test": "playwright test", | ||
"test:ui": "pnpm run test --ui" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/react": "^3.6.0", | ||
"@iconify-json/ph": "^1.1.13", | ||
"@iconify-json/svg-spinners": "^1.1.2", | ||
"@playwright/test": "^1.46.0", | ||
"@tutorialkit/astro": "workspace:*", | ||
"@tutorialkit/components-react": "workspace:*", | ||
"@tutorialkit/runtime": "workspace:*", | ||
"@tutorialkit/theme": "workspace:*", | ||
"@tutorialkit/types": "workspace:*", | ||
"@types/node": "^22.2.0", | ||
"@unocss/reset": "^0.59.4", | ||
"@unocss/transformer-directives": "^0.62.0", | ||
"astro": "^4.12.0", | ||
"fast-glob": "^3.3.2", | ||
"playwright": "^1.46.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"unocss": "^0.59.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { defineConfig } from '@playwright/test'; | ||
|
||
export default defineConfig({ | ||
webServer: { | ||
command: 'pnpm preview', | ||
url: 'http://localhost:4329', | ||
reuseExistingServer: !process.env.CI, | ||
stdout: 'ignore', | ||
stderr: 'pipe', | ||
}, | ||
use: { | ||
baseURL: 'http://localhost:4329', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { contentSchema } from '@tutorialkit/types'; | ||
import { defineCollection } from 'astro:content'; | ||
|
||
const tutorial = defineCollection({ | ||
type: 'content', | ||
schema: contentSchema, | ||
}); | ||
|
||
export const collections = { tutorial }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
type: tutorial | ||
mainCommand: '' | ||
prepareCommands: [] | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
type: part | ||
title: Tests | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
type: chapter | ||
title: Navigation | ||
lessons: | ||
- page-one | ||
- page-two | ||
- page-three | ||
mainCommand: '' | ||
prepareCommands: [] | ||
--- |
6 changes: 6 additions & 0 deletions
6
test/ui/src/content/tutorial/tests/navigation/page-one/content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
type: lesson | ||
title: Page one | ||
--- | ||
|
||
# Navigation test - Page one |
6 changes: 6 additions & 0 deletions
6
test/ui/src/content/tutorial/tests/navigation/page-three/content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
type: lesson | ||
title: Page three | ||
--- | ||
|
||
# Navigation test - Page three |
6 changes: 6 additions & 0 deletions
6
test/ui/src/content/tutorial/tests/navigation/page-two/content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
type: lesson | ||
title: Page two | ||
--- | ||
|
||
# Navigation test - Page two |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
type: chapter | ||
title: Preview | ||
lessons: | ||
- single | ||
- multiple | ||
template: vite | ||
mainCommand: 'pnpm start' | ||
prepareCommands: ['pnpm install'] | ||
--- |
9 changes: 9 additions & 0 deletions
9
test/ui/src/content/tutorial/tests/preview/multiple/content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
type: lesson | ||
title: Multiple | ||
previews: | ||
- [5173, "First Server"] | ||
- [5173, "Second Server"] | ||
--- | ||
|
||
# Preview test - Multiple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
type: lesson | ||
title: Single | ||
previews: | ||
- [5173, "Vite Dev Server"] | ||
--- | ||
|
||
# Preview test - Single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
/// <reference types="@tutorialkit/astro/types" /> | ||
/// <reference types="astro/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Default template</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>Default template</h1> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "default-template", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite Template</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
document.querySelector('#app').innerHTML = ` | ||
<div> | ||
<h1>Hello Vite Template!</h1> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "vite-project", | ||
"private": true, | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"start": "vite" | ||
}, | ||
"devDependencies": { | ||
"vite": "^5.4.0" | ||
} | ||
} |
Oops, something went wrong.