- Add README.md for project description and CLI usage - Create main application component with basic structure in app.tsx - Implement CodeMirror editor base functionality in editor.base.ts - Extend CodeMirror editor for JSON support in editor.json.ts - Add support for multiple languages in editor.ts - Create utility functions for editor manipulation in editor.utils.ts - Implement tab key formatting and indentation in tab.ts - Add Tailwind CSS integration in index.css - Develop JSON editor web component in json.ts - Create a template component for rendering in lib.ts - Set up main entry point in main.ts - Configure TypeScript settings in tsconfig.json - Define custom element typings in typings.d.ts - Configure Vite for library and application builds in vite.config.lib.ts and vite.config.ts
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
# .cnb.yml
|
|
$:
|
|
vscode:
|
|
- docker:
|
|
image: docker.cnb.cool/kevisual/dev-env:latest
|
|
services:
|
|
- vscode
|
|
- docker
|
|
imports: https://cnb.cool/kevisual/env/-/blob/main/env.yml
|
|
# 开发环境启动后会执行的任务
|
|
# stages:
|
|
# - name: pnpm install
|
|
# script: pnpm install
|
|
|
|
|
|
main:
|
|
web_trigger_sync_to_gitea:
|
|
- services:
|
|
- docker
|
|
imports:
|
|
- https://cnb.cool/kevisual/env/-/blob/main/env.yml
|
|
stages:
|
|
- name: 'show username'
|
|
script: echo "GITEA_USERNAME is ${GITEA_USERNAME} and GITEA_PASSWORD is ${GITEA_PASSWORD}"
|
|
- name: sync to gitea
|
|
image: tencentcom/git-sync
|
|
settings:
|
|
target_url: https://git.xiongxiao.me/web-components/kv-code.git
|
|
auth_type: https
|
|
username: "oauth2"
|
|
password: ${GITEA_TOKEN}
|
|
git_user: "abearxiong"
|
|
git_email: "xiongxiao@xiongxiao.me"
|
|
sync_mode: rebase
|
|
branch: main
|
|
web_trigger_sync_from_gitea:
|
|
- services:
|
|
- docker
|
|
imports:
|
|
- https://cnb.cool/kevisual/env/-/blob/main/env.yml
|
|
stages:
|
|
- name: '添加 gitea的origin'
|
|
script: |
|
|
git remote remove gitea 2>/dev/null || true
|
|
git remote add gitea https://oauth2:${GITEA_TOKEN}@git.xiongxiao.me/web-components/kv-code.git
|
|
- name: '同步gitea代码到当前仓库'
|
|
script: git pull gitea main
|
|
- name: '提交到原本的origin'
|
|
script: git push origin main
|
|
|
|
|
|
"**":
|
|
web_trigger_test:
|
|
- stages:
|
|
- name: 执行任务
|
|
script: echo "job" |