Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding editor-sample package #10

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
node-version: 20
cache: 'npm'
- run: npm ci
- run: (cd ./packages/document-core;npm ci)
- run: (cd ./packages/editor-sample;npm ci)
- run: npx eslint .
- run: npx prettier . --check
- run: npx tsc --noEmit
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy static content to Pages
on:
push:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies and build
working-directory: './packages/editor-sample'
run: |
npm ci
npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './packages/editor-sample/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion packages/document-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "esnext",
"outDir": "dist"
},
"exclude": ["node_modules", "dist"]
"exclude": ["dist"]
}
1 change: 1 addition & 0 deletions packages/editor-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @usewaypoint/editor-sample
34 changes: 34 additions & 0 deletions packages/editor-sample/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="apple-touch-icon" sizes="180x180" href="/src/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/src/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/src/favicon/favicon-16x16.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>Waypoint editor</title>
<style>
html {
margin: 0px;
height: 100vh;
width: 100%;
}
body {
min-height: 100vh;
width: 100%;
}
#root {
height: 100vh;
position: relative;
box-sizing: border-box;
margin: 0;
display: flex;
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading
Loading