我在源代码管理中包含哪些Ionic生成的文件?

问题描述 投票:1回答:2

我使用此命令生成一个新的空白离子项目:离子启动newapp blank --v1

我生成了以下文件和文件夹:

enter image description here

我不确定我应该包括哪些或从源代码控制中排除。

git ionic-framework version-control
2个回答
1
投票

我喜欢Ionic自己跟随他们的example apps的布局:

resources/
src/
www/
.editorconfig
.gitignore
config.xml
ionic.config.json
package.json
tsconfig.json
tslint.json

这消除了node_modules的混乱,可以用npm installplatformplugins目录重建,也可以重建。

如果你想要遵循这个布局,你的.gitignore可能如下所示:

.sass-cache/
.tmp/
.versions/
coverage/
dist/
node_modules/
tmp/
temp/
hooks/
platforms/
plugins/
plugins/android.json
plugins/ios.json

0
投票

在新的项目文件夹中执行“npm install”时,我也收到此消息,上面只有Grayson Kent的结构:

npm notice created a lockfile as package-lock.json. You should commit this file.

所以package-lock.json也应该提交给你的源代码控件。

© www.soinside.com 2019 - 2024. All rights reserved.