Skip to content

Commit

Permalink
Adding editor-sample package (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
cohitre authored Feb 23, 2024
1 parent cb6280f commit 7fa547d
Show file tree
Hide file tree
Showing 84 changed files with 7,914 additions and 3 deletions.
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

0 comments on commit 7fa547d

Please sign in to comment.