项目结构
package.json
package.json
文件包含依赖项、脚本和应用程序的入口点(在 main
字段中)列表。在 NPM 文档中了解更多信息
注意
NativeScript 插件应始终安装为 dependencies
,因为 NativeScript 不包含来自 devDependencies
的原生代码。
json
{
"name": "my-cool-app",
"main": "src/main.ts",
"version": "1.0.0",
"private": true,
"dependencies": {
"@nativescript/core": "~8.5.0"
},
"devDependencies": {
"@nativescript/android": "8.5.0",
"@nativescript/ios": "8.5.0",
"@nativescript/types": "~8.5.0",
"@nativescript/webpack": "~5.0.10",
"typescript": "~4.5.5"
}
}