Last week on openSAP Craig Haworth started a new course openSAP – Introduction to Mobile Solution Development for the Enterprise.
There we use Cordova/PhoneGap to create a Hybrid Web Container in order to provide mobile applications for different platforms.
To easily integrate the powerful SAPUI5 we can simply add the following JavaScript code to bootstrap our application:
<script id="sap-ui-bootstrap" type="text/javascript" src="/resources/sap-ui-core.js" data-sap-ui-theme="sap_goldreflection" data-sap-ui-libs="sap.ui.commons"></script>
But being a developer and trying to automate nearly everything that makes the process easier I wanted to be able to have already prepared application templates while creating a new app.
Therefore we have to edit/add our changes to the Cordova Project Template.
On a Mac you’ll have to put it in the following path:
~/.cordova/lib/www/cordova/www/
Sample:
/Users/pw/.cordova/lib/www/cordova/www/
On a Windows PC you’ll have to put it in the Phonegap Node Module:
$userdir\node_modules\phonegap\node_modules\phonegap-build\res\project-template
Sample:
C:\Users\Peter\node_modules\phonegap\node_modules\phonegap-build\res\project-template
Happy developing!
I don't understand /:
where is the template project ?