我经常注意到使用Ionic2 cli启动一个新项目,生成缺少src文件夹的代码。目前尚不清楚如何解决这个问题。
我使用命令生成了一个全新的项目:
ionic start webapp sidemenu --V2
并生成文件夹,如屏幕截图所示。我在Windows 10,节点版本6.9.4,离子版本2.2.1
我的package.json是:
{
"name": "webapp",
"version": "1.1.1",
"description": "webapp: An Ionic project",
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"shelljs": "^0.3.0"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}
答案 0 :(得分:2)
我遇到同样的问题,在这里找到了anwser:Ionic2 folder structure missing app folder
使用“--v2”选项强制ionic2和DL所有文件夹/文件
ionic start myProject --v2