Skip to content

Commit

Permalink
feat: create developer plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
0xzio committed Jun 29, 2024
1 parent d5faad0 commit 444e942
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/desktop/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VITE_API_URL=https://app.penx.io
VITE_API_URL=http://localhost:3000
VITE_API_URL=https://app.penx.io
# VITE_API_URL=http://localhost:3000

NEXT_PUBLIC_PLATFORM=DESKTOP

Expand Down
4 changes: 4 additions & 0 deletions extension-samples/preset-ui/developer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.DS_Store
dist
*.log
7 changes: 7 additions & 0 deletions extension-samples/preset-ui/developer/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80
}
1 change: 1 addition & 0 deletions extension-samples/preset-ui/developer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Counter
1 change: 1 addition & 0 deletions extension-samples/preset-ui/developer/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions extension-samples/preset-ui/developer/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "developer",
"title": "Developer",
"description": "PenX Developer Tools",
"icon": {
"name": "lucide--braces"
},
"commands": [
{
"name": "create-extension",
"title": "Create Extension",
"subtitle": "",
"description": "",
"icon": {
"name": "lucide--braces"
},
"mode": "preset-ui"
}
]
}
15 changes: 15 additions & 0 deletions extension-samples/preset-ui/developer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "counter",
"private": true,
"scripts": {
"dev": "penx dev",
"release": "penx release"
},
"devDependencies": {
"@penxio/preset-ui": "workspace:*",
"@penxio/api": "workspace:*",
"penx-cli": "workspace:*",
"prettier": "^3.2.5",
"typescript": "^5.3.2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { MarkdownApp } from '@penxio/preset-ui'

export function main() {
let counter = 1

const app = new MarkdownApp({ content: `## ${counter}` }).run()

setInterval(() => {
counter++
app.setState({ content: `## ${counter}` })
}, 1000)
}
17 changes: 17 additions & 0 deletions extension-samples/preset-ui/developer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "es2020",
"module": "esnext",
"strict": true,
"lib": ["ESNext", "DOM"],
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"allowJs": true,
"noEmit": true,
"outDir": "dist",
"resolveJsonModule": true
}
}

0 comments on commit 444e942

Please sign in to comment.