ionic Creatorで作成した画面データのZIPをExportしてWebサーバにデプロイする
ionic Creatorでプロジェクト作成
- https://creator.ionic.io/ にアクセスし、アカウント作成
- +New Projectから新規のプロジェクト(myapp)を作成
- Ionic v1とIonic v3.xに対応してるが、v3を選択
開発資源をZIPファイルにExport
- 適当に画面制作をした後、右上の雲のマークからZIPファイルにエクスポート
- myapp.zipをダウンロード
Ionicのプロジェクトをセットアップ
ionic start myapp
? What starter would you like to use
-> sidemenu
? Would you like to integrate your new app with Cordova to target native iOS and Android?
-> No
? Install the free Ionic Pro SDK and connect your app? (Y/n)
-> Yes
ZIPを解凍した資源をionicプロジェクトフォルダsrc配下にコピー
unzip myapp.zip
srcフォルダ配下に以下の資源が展開される * src/index.html * src/app/ * src/pages/
cp -pr src/* IONIC_PROJECT/src
プレビュー
ionic serve
ビルド
ionic build
- www配下にSPA資源が配置される
- www配下の資源をApacheのDocumentRoot配下にコピーすることでWebアプリとして利用できる
参考URL
https://docs.usecreator.com/docs/zip-export-an-ionic-project