Skip to content

Commit

Permalink
feat: migrate to svelte
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RangHo committed Jan 2, 2025
1 parent 40fff20 commit 6cd7507
Show file tree
Hide file tree
Showing 32 changed files with 3,462 additions and 144 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*.{html,svelte,js,ts,css,postcss,json}]
indent_style = space
indent_size = 2
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true

- name: Build project
run: |
pnpm build
- name: Ensure correct permission
run: |
chmod -v -R +rX "build" | while read line; do
echo "::notice title=Ensuring correct permission::$line"
done
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: build

deploy:
needs: build

# Set up proper permission for deploying to GitHub Pages
permissions:
pages: write
id-token: write

# Set up correct environment for deploying to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v2
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
87 changes: 0 additions & 87 deletions clearsense-manage/api.html

This file was deleted.

47 changes: 0 additions & 47 deletions clearsense-manage/index.html

This file was deleted.

34 changes: 34 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['**/*.svelte'],

languageOptions: {
parserOptions: {
parser: ts.parser,
},
},
}
);
10 changes: 0 additions & 10 deletions index.html

This file was deleted.

45 changes: 45 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "mpwav.github.io",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint ."
},
"devDependencies": {
"@eslint/compat": "^1.2.3",
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"globals": "^15.0.0",
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.6",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.4.11"
},
"packageManager": "[email protected]+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
"dependencies": {
"@friendofsvelte/tipex": "0.0.7-fix-0",
"@tiptap/starter-kit": "^2.11.0",
"prosemirror-example-setup": "^1.2.3",
"prosemirror-model": "^1.24.1",
"prosemirror-schema-basic": "^1.2.3",
"prosemirror-schema-list": "^1.5.0",
"prosemirror-state": "^1.4.3",
"prosemirror-transform": "^1.10.2",
"prosemirror-view": "^1.37.1",
"svelte-tiptap": "^2.1.0"
}
}
Loading

0 comments on commit 6cd7507

Please sign in to comment.