Skip to content

Commit

Permalink
Create basic collaborative markdown editor
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron7 committed May 31, 2024
0 parents commit 3bd3b5b
Show file tree
Hide file tree
Showing 44 changed files with 8,244 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
coverage/
11 changes: 11 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: ['@nkzw'],
settings: {
'import/resolver': {
alias: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
map: [['@', './src']],
},
},
},
};
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: test

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 8.*
- run: pnpm install
- run: pnpm test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.eslintcache
.pnpm-debug.log
/node_modules/
coverage/
dist/
tsconfig.tsbuildinfo
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolution-mode=highest
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
dist/
pnpm-lock.yaml
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Collabify

- `pnpm install`
- `pnpm dev` for development.
- `pnpm test` to run tests.
- `pnpm build` for production builds.
17 changes: 17 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.cjs",
"css": "src/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
7 changes: 7 additions & 0 deletions git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0
echo "$FILES" | xargs pnpm prettier --ignore-unknown --write
echo "$FILES" | xargs git add

exit 0
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#fff" />
<title>Collabify</title>
</head>
<body>
<div id="root"></div>
<script src="/src/index.tsx" type="module"></script>
</body>
</html>
78 changes: 78 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "@nkzw/vite-ts-react-tailwind",
"version": "0.0.1",
"author": "Christoph Nakazawa <[email protected]>",
"repository": {
"type": "git",
"url": "git://github.com/cpojer/vite-ts-react-tailwind.git"
},
"type": "module",
"engines": {
"node": ">=18.11.0",
"pnpm": ">=7.1.0"
},
"dependencies": {
"@codemirror/autocomplete": "^6.16.0",
"@codemirror/lang-markdown": "^6.2.5",
"@codemirror/language": "^6.10.1",
"@codemirror/language-data": "^6.5.1",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.26.3",
"@lezer/highlight": "^1.2.0",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@uiw/react-codemirror": "^4.22.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lib0": "^0.2.93",
"lucide-react": "^0.379.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.1",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"ws": "^8.17.0",
"y-codemirror.next": "^0.3.3",
"y-webrtc": "^10.3.0",
"yjs": "^13.6.15"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"@nkzw/eslint-config": "^1.14.0",
"@swc/core": "^1.4.2",
"@types/node": "^20.11.24",
"@types/react": "^18.2.61",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.18",
"eslint": "^8.57.0",
"eslint-import-resolver-alias": "^1.1.2",
"npm-run-all2": "^6.1.2",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.4.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vite": "^5.1.4",
"vitest": "^1.3.1"
},
"scripts": {
"preinstall": "command -v git >/dev/null 2>&1 && git config core.hooksPath git-hooks || true",
"build": "vite build",
"dev:update-deps": "rm -rf pnpm-lock.yaml node_modules/ **/node_modules && pnpm install",
"dev": "vite dev",
"format": "prettier --write .",
"lint:format": "prettier --cache --check .",
"lint": "eslint --cache .",
"test": "npm-run-all --parallel tsc:check vitest:run lint lint:format",
"tsc:check": "tsc",
"vitest:run": "vitest run"
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
]
}
Loading

0 comments on commit 3bd3b5b

Please sign in to comment.