-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Convert Mendix Apps to Progressive Web Apps PWAs
These instructions will walk with you step by step through the process of creating/converting Mendix Apps to Progressive Web Apps.
This Generator requires node & gulp-cli to be installed on your machine.
- you can check if you already have node installed by opening your command line tool and typing :
$ node --version
>> v8.9.4 // output your installed node version number
If you don't have node on your machine, you can download it from its official website Nodejs.org
- After making sure that you have node installed, let's check if you have gulp-cli installed, you can do that by typing in your command line tool:
$ gulp -v
>> CLI version 1.3.0 // output your installed node version number
If you don't have gulp-cli installed on your machine, you can install it by typing the following command in your command line tool:
$ npm install gulp-cli -g
After having node & gulp-cli installed we are now ready to go! π
-
Extract the content of the downloaded
bizzo-pwa.zip
into your Mendix Application root folder.
your root folder now should have a structure like this :
YOUR-MENDIX-APP-NAME
βββ deployment
βββ javasource
βββ pwa_assets
β βββ pwa_icons
β βββ _bizzo-scripts
β βββ _bizzo-tags
β βββ bizzo-connectivity-listener.js
β βββ bizzo-sw-register.js
β βββ manifest.json
βββ resources
βββ theme
β βββ styles
β βββ index.html
β βββ ...
βββ userlib
βββ widgets
βββ .classpath
βββ .project
βββ bizzo.config.json
βββ gulpfile.js
βββ package.json
βββ YOUR_APP_NAME.mpr
βββ ...
- Open your command line and run
npm install
Make sure that all the requirements are set and installed on your machine
IMPORTANT NOTE: after running
npm install
DO NOT forget to addnode_modules
folder to yoursvn ignore list
- Now, in your
index.html
add the following comments:
- Before the closing
<head>...</head>
add :
<head>
....... meta tags
........ link tags
......... etc
.........
<!-- bizzo-tags -->
<!-- bizzo-tags-end -->
</head>
the generator will use this comment/hook to inject the required meta tags into your index.html
file.
- Before the closing
<head>...</head>
add :
<body>
....... html tags
........
......... script tags
......... etc
<!-- bizzo-scripts -->
<!-- bizzo-scripts-end -->
</body>
the generator will use this comment/hook to inject the required scripts into your index.html
file.