
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
app-magic-box
Advanced tools
注意:node版本 >= 8.9
1. 项目在抹平平台差异时,尽量保证web端用户能够无缝衔接。
2. 项目中不能直接引入vue,vue-router,vuex库(如果引入的话,虽然依赖包放在dev依赖上,但是
webpack依然会将引入的包打包进代码里,这样会让使用库的人重复引入代码)
如果需要类型,则可以引用vue/types vue-router/types
项目使用eslint的ts版本作为代码规范,但是项目中可能还有些eslint不易检查的一些规范,
这里稍微列举一下。
1.项目中所有文件名以小写驼峰命名(例:applicationConfig.ts)。
2.项目中class以大写驼峰命名(例:Application)
3.项目中尽量使用type来定义数据结构,interface定义class接口
4.项目中尽量对所有使用到的class,methods,enum,type,interface等书写注释,尽量浅显易懂,也为了更好的生成doc文档(项目中使用typedoc来生成doc文档)
5.项目中尽量不要添加dependencies类型的依赖,如有,请提出,并与大家商量。
6.项目中尽量不要有重复代码,如有,请尽量抽取出来。
// XXX为当前实际地址
git clone
npm install
npm run build
执行打包会将代码打包到dist目录下:cross-common.js
npm run publish-patch 项目发布修补版本
npm run publish-minor 项目发布小版本
npm run doc
会对src下的代码生成api文档放置到docs目录下
npm run lint 修复src下的代码
npm run lintAll 修复整个项目中的代码,会去除.eslintignore中的目录
npm run format 对src下的代码进行美化
+-- src/
| +-- common/ // 公用资源
| | +-- constants/ // 公共常量
| | +-- utils/ // 常用函数
| +-- core/ // 项目核心代码
| | +-- app/ // app类
| | +-- base/ // 提供项目中的基础类
| | +-- mgrs/ // 项目中的重点部分,各个管理器
| | +-- runtime/ // 运行时对象
| | +-- utils/ // 项目中的工具函数等
| +-- main.ts // 项目入口
| | ............
|
|
|-- .gitignore // git的排除目录
|-- .eslintignore // eslint的排除目录
|-- .eslintrc.js // eslint 配置文件
|-- babel.config.js // babel 配置文件
|-- package.json // 项目包文件
|-- prettier.config.js // prettier配置文件
|-- tsconfig.json // typescript 配置
|-- webpack.common.js // webpack通用配置
|-- webpack.dev.js // webpack dev配置
|-- webpack.prod.js // webpack prod配置
TypeScript文档 [webpack] [babel] [eslint] [typedoc] ...
FAQs
We found that app-magic-box demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.