Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .cnb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
$:
# 网页远程开发
vscode:
- services:
- docker
- vscode
runner:
cpus: 1
docker:
build: .ide/Dockerfile
env:
CNB_WELCOME_CMD: fastfetch
stages:
- name: update dependencies
script: fastfetch

# VS code打开
api_trigger_cnb_dev_plugin:
- services:
- docker
- vscode
docker:
build: .ide/Dockerfile
env:
CNB_WELCOME_CMD: fastfetch
stages:
- name: update dependencies
script: fastfetch

push:
- runner:
cpus: 1
imports: https://cnb.cool/BlueScreen-Studio/Tech/secrets/-/blob/sdcom/github.yml
stages:
- name: Sync to github
image: tencentcom/git-sync
settings:
target_url: https://github.com/SDCOM-0415/Image-to-Braille.git
auth_type: https
username: ${GIT_USERNAME}
password: ${GIT_ACCESS_TOKEN}
git_user: ${GIT_USERNAME}
git_email: ${GIT_EMAIL}
force: true
branch: master
- name: 删除原文件,替换备案域名专用文件
script: rm ./index.html && cp ./index_zh-cn.html ./index.html
- name: 部署我的 eo pages 正式环境
imports:
- https://cnb.cool/BlueScreen-Studio/Tech/secrets/-/blob/sdcom/eopages.yml
image: tencentcom/deploy-eopages:latest
# 这里需要使用您的EO_SECRET,在上面imports已经说明
script: edgeone pages deploy ./ -n ascii-sdcom -t $EO_SECRET

90 changes: 90 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Git
.git
.gitignore
.gitattributes

# Documentation
README.md
README.txt
CHANGELOG.md
LICENSE
*.md

# Development files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Node.js (if using build tools)
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.npm
.yarn-integrity

# Build tools and dependencies
package-lock.json
yarn.lock
gulpfile.js
webpack.config.js
.babelrc
.eslintrc*
.prettierrc*

# Logs
logs/
*.log

# Temporary files
tmp/
temp/
*.tmp

# Docker
Dockerfile*
docker-compose*.yml
.dockerignore

# CI/CD
.github/
.gitlab-ci.yml
.travis.yml
.circleci/

# Environment files
.env
.env.local
.env.development
.env.test
.env.production

# IDE files
*.sublime-project
*.sublime-workspace

# Backup files
*.backup
*.bak
*.old

# Testing
test/
tests/
spec/
__tests__/
coverage/

# Source maps (if you don't want them in production)
*.map
77 changes: 76 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,76 @@
*.txt
# 操作系统生成的文件
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# 编辑器和IDE文件
.vscode/
.idea/
*.swp
*.swo
*~
.project
.settings/
.classpath

# 临时文件
*.tmp
*.temp
*.log
*.cache

# 依赖管理
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
yarn.lock

# 构建输出
dist/
build/
out/

# 环境配置文件
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# 备份文件
*.bak
*.backup
*.old

# 特定于HTML项目的文件
# 如果使用预处理器
.sass-cache/
*.css.map
*.scss.map

# 如果使用任务运行器
.grunt/
.gulp/

# 如果使用Webpack
webpack-stats.json

# 服务文件
.htaccess
web.config

# 测试覆盖率报告
coverage/
.coverage
.nyc_output

# 其他
*.pid
*.seed
*.pid.lock
51 changes: 51 additions & 0 deletions .ide/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#帮助文档地址: https://docs.cnb.cool/zh/vscode/quick-start.html
FROM cnbcool/default-dev-env:latest

# 腾讯云软件源使用示例: https://cnb.cool/examples/mirrors/mirrors.cloud.tencent.com

# 以及按需安装其他软件
RUN apt-get update && apt-get install -y git sudo vim curl git-lfs

# 安装 code-server 和 vscode 常用插件
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.100.3 \
&& code-server --install-extension cnbcool.cnb-welcome \
&& code-server --install-extension redhat.vscode-yaml \
&& code-server --install-extension detachhead.basedpyright \
&& code-server --install-extension tamasfe.even-better-toml \
&& code-server --install-extension ygqygq2.turbo-file-header \
&& code-server --install-extension tencent-cloud.coding-copilot \
&& code-server --install-extension eamodio.gitlens \
&& code-server --install-extension cloudstudio.live-server \
&& code-server --install-extension mhutchie.git-graph \
&& code-server --install-extension waderyan.gitblame \
&& code-server --install-extension donjayamanne.githistory \
&& code-server --install-extension yandeu.five-server \
&& code-server --install-extension ms-ceintl.vscode-language-pack-zh-hans \
&& wget https://cnb.cool/SDCOM/moren/html/-/git/raw/main/.ide/argv.json -O /root/.local/share/code-server/User/argv.json \
&& wget https://cnb.cool/SDCOM/moren/html/-/git/raw/main/.ide/languagepacks.json -O /root/.local/share/code-server/languagepacks.json \
&& echo done

# 安装 ssh 服务,用于支持 VSCode 客户端通过 Remote-SSH 访问开发环境
RUN apt-get update && apt-get install -y wget unzip openssh-server

# 安装 docker-compose
RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose \
&& docker-compose --version \
&& echo done

# 安装 fastfetch
RUN wget https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-amd64.deb \
&& dpkg -i fastfetch-linux-amd64.deb \
&& rm fastfetch-linux-amd64.deb \
&& echo done

# 指定工作目录
WORKDIR /workspace

# 指定容器启动时默认执行的命令
CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "none"]

# 指定字符集支持命令行输入中文(根据需要选择字符集)
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
3 changes: 3 additions & 0 deletions .ide/argv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"locale": "zh-cn"
}
Loading