Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为啥 npx create-aircode-app 生成的代码并不依赖 aircode #7

Open
rupertqin opened this issue Jan 5, 2024 · 1 comment
Open

Comments

@rupertqin
Copy link

这个aircode 好奇怪, 为啥 npx create-aircode-app 生成的代码并不依赖 aircode, 但是 functions 里的代码还要依赖 const aircode = require("aircode") , 而且把这个依赖去掉也能运行?

@allmors
Copy link

allmors commented Jan 11, 2024

这个aircode 好奇怪, 为啥 npx create-aircode-app 生成的代码并不依赖 aircode, 但是 functions 里的代码还要依赖 const aircode = require("aircode") , 而且把这个依赖去掉也能运行?

看这里:https://github.com/AirCodeLabs/Hydrogen/blob/34d9a016cd7461d4f12ec053399846ad4b925437/src/index.js#L54

去掉依赖能运行是因为你不进行库操作和文件操作,至于为啥这样写是为了兼容生产环境的aircode语法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants