You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4082cd2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/pages/appflow/cookbook/phonegap-build-migration.md
+59-8Lines changed: 59 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,14 +130,6 @@ The config.xml file might need some additional changes in order to function corr
130
130
131
131
Finally, you will want to make sure that whatever Cordova plugins you are using are the latest version to ensure compatibility with the current version of Cordova.
132
132
133
-
### Migrate the Code
134
-
135
-
Now that we have our icons, splash screens, and config.xml in place, we can turn our attention to the actual app itself. Ionic Appflow expects the entire app to be inside of a directory named `www`. That's it. Create that directory then move all app files into it, including HTML, CSS, JavaScript, images and any other related resources.
136
-
137
-
Here is what the app’s directory structure should look like:
> If you already have your app in a Git repository, you can skip this section.
@@ -174,6 +166,65 @@ There are a variety of ways to add your local repository to their sites, but ult
174
166
$ git push origin master
175
167
```
176
168
169
+
### Create package.json and Ionic config files
170
+
171
+
> If you do not have Node or npm installed on your computer, you will need to do this before proceeding. If you need to install Node, please select the [current LTS version](https://nodejs.org).
172
+
173
+
Since Ionic Appflow was originally created to automate builds for Ionic apps, it requires two files that your app may not have. First, create a `package.json` file. The easiest way to create it is to run:
174
+
175
+
```bash
176
+
$ npm init
177
+
```
178
+
179
+
Answer all the prompts, including package name, version, and description. For `git repository`, enter the path configured in the previous step. The `entry point: (index.js)` can be set to anything since it won't be used.
Next, create a new file at the root of the project - `ionic.config.json`. Copy in the following, changing only the `name` for your app:
201
+
202
+
```json
203
+
{
204
+
"name": "my-app",
205
+
"type": "custom",
206
+
"integrations": {
207
+
"cordova": {}
208
+
}
209
+
}
210
+
```
211
+
212
+
Finally, commit the new files to your project:
213
+
214
+
```bash
215
+
$ git add .
216
+
$ git commit -m "added package json and ionic config"
217
+
$ git push
218
+
```
219
+
220
+
### Migrate the Code
221
+
222
+
Now that we have our icons, splash screens, config.xml, and new required Appflow files in place, we can turn our attention to the actual app itself. Ionic Appflow expects the entire app to be inside of a directory named `www`. That's it. Create that directory then move all app files into it, including HTML, CSS, JavaScript, images and any other related resources.
223
+
224
+
Here is what the app’s directory structure should look like:
With your app ready for Appflow integration, it’s time to sign up, link your Git repository, then build the native iOS and Android versions. Begin by [signing up for an Appflow account](https://dashboard.ionicframework.com).
0 commit comments