Skip to content

Commit 3e21e76

Browse files
committed
feat: migrate to svelte
Squashed commit of the following: commit 1a4ff8983f4448cb497f9c7d041424c8fef2b6e1 Author: RangHo Lee <[email protected]> Date: Thu Jan 2 10:48:38 2025 +0900 ci: add deployment workflow commit 3242b78ef86e2990e1522253ed84965689c4c836 Author: RangHo Lee <[email protected]> Date: Thu Jan 2 10:47:00 2025 +0900 chore: remove old pages commit 6ade85bab053e24a8800658e96742f91672db74e Author: RangHo Lee <[email protected]> Date: Thu Jan 2 10:46:31 2025 +0900 feat: implement CORS or whatnot commit b541f350aec9479a237751fc4e58518284ce0851 Author: RangHo Lee <[email protected]> Date: Thu Jan 2 00:32:37 2025 +0900 feat: implement rich text editor for notice commit d1d199e907ca876da97d3745b37bb79eaa33ec87 Author: RangHo Lee <[email protected]> Date: Fri Dec 27 11:11:22 2024 +0900 chore: initialize sveltekit
1 parent 40fff20 commit 3e21e76

33 files changed

+3463
-144
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
3+
[*.{html,svelte,js,ts,css,postcss,json}]
4+
indent_style = space
5+
indent_size = 2

.github/workflows/deploy.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
24+
- name: Setup PNPM
25+
uses: pnpm/action-setup@v2
26+
with:
27+
version: latest
28+
run_install: true
29+
30+
- name: Build project
31+
run: |
32+
pnpm build
33+
34+
- name: Ensure correct permission
35+
run: |
36+
chmod -v -R +rX "build" | while read line; do
37+
echo "::notice title=Ensuring correct permission::$line"
38+
done
39+
40+
- name: Upload GitHub Pages artifact
41+
uses: actions/upload-pages-artifact@v2
42+
with:
43+
path: build
44+
45+
deploy:
46+
needs: build
47+
48+
# Set up proper permission for deploying to GitHub Pages
49+
permissions:
50+
pages: write
51+
id-token: write
52+
53+
# Set up correct environment for deploying to GitHub Pages
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deploy.outputs.page_url }}
57+
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deploy
63+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
.netlify
7+
.wrangler
8+
/.svelte-kit
9+
/build
10+
11+
# OS
12+
.DS_Store
13+
Thumbs.db
14+
15+
# Env
16+
.env
17+
.env.*
18+
!.env.example
19+
!.env.test
20+
21+
# Vite
22+
vite.config.js.timestamp-*
23+
vite.config.ts.timestamp-*

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# sv
2+
3+
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npx sv create
12+
13+
# create a new project in my-app
14+
npx sv create my-app
15+
```
16+
17+
## Developing
18+
19+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+
21+
```bash
22+
npm run dev
23+
24+
# or start the server and open the app in a new browser tab
25+
npm run dev -- --open
26+
```
27+
28+
## Building
29+
30+
To create a production version of your app:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
You can preview the production build with `npm run preview`.
37+
38+
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

clearsense-manage/api.html

Lines changed: 0 additions & 87 deletions
This file was deleted.

clearsense-manage/index.html

Lines changed: 0 additions & 47 deletions
This file was deleted.

eslint.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import prettier from 'eslint-config-prettier';
2+
import js from '@eslint/js';
3+
import { includeIgnoreFile } from '@eslint/compat';
4+
import svelte from 'eslint-plugin-svelte';
5+
import globals from 'globals';
6+
import { fileURLToPath } from 'node:url';
7+
import ts from 'typescript-eslint';
8+
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
9+
10+
export default ts.config(
11+
includeIgnoreFile(gitignorePath),
12+
js.configs.recommended,
13+
...ts.configs.recommended,
14+
...svelte.configs['flat/recommended'],
15+
prettier,
16+
...svelte.configs['flat/prettier'],
17+
{
18+
languageOptions: {
19+
globals: {
20+
...globals.browser,
21+
...globals.node,
22+
},
23+
},
24+
},
25+
{
26+
files: ['**/*.svelte'],
27+
28+
languageOptions: {
29+
parserOptions: {
30+
parser: ts.parser,
31+
},
32+
},
33+
}
34+
);

index.html

Lines changed: 0 additions & 10 deletions
This file was deleted.

package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "mpwav.github.io",
3+
"private": true,
4+
"version": "0.0.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12+
"format": "prettier --write .",
13+
"lint": "prettier --check . && eslint ."
14+
},
15+
"devDependencies": {
16+
"@eslint/compat": "^1.2.3",
17+
"@sveltejs/adapter-static": "^3.0.6",
18+
"@sveltejs/kit": "^2.0.0",
19+
"@sveltejs/vite-plugin-svelte": "^4.0.0",
20+
"eslint": "^9.7.0",
21+
"eslint-config-prettier": "^9.1.0",
22+
"eslint-plugin-svelte": "^2.36.0",
23+
"globals": "^15.0.0",
24+
"prettier": "^3.3.2",
25+
"prettier-plugin-svelte": "^3.2.6",
26+
"svelte": "^5.0.0",
27+
"svelte-check": "^4.0.0",
28+
"typescript": "^5.0.0",
29+
"typescript-eslint": "^8.0.0",
30+
"vite": "^5.4.11"
31+
},
32+
"packageManager": "[email protected]+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
33+
"dependencies": {
34+
"@friendofsvelte/tipex": "0.0.7-fix-0",
35+
"@tiptap/starter-kit": "^2.11.0",
36+
"prosemirror-example-setup": "^1.2.3",
37+
"prosemirror-model": "^1.24.1",
38+
"prosemirror-schema-basic": "^1.2.3",
39+
"prosemirror-schema-list": "^1.5.0",
40+
"prosemirror-state": "^1.4.3",
41+
"prosemirror-transform": "^1.10.2",
42+
"prosemirror-view": "^1.37.1",
43+
"svelte-tiptap": "^2.1.0"
44+
}
45+
}

0 commit comments

Comments
 (0)