increment counter improvements, application now builds for release and debug on android/browser and web platforms

production
Override-6 2 years ago
parent 8688df6f10
commit 027d808706

@ -0,0 +1,5 @@
# Application Basket
Ce repository utilise Cordova pour build sur electron / android et web.
## contribuer
Dans le code ou dans la documentation, merci d'ecrire en anglais si possible

@ -8,4 +8,8 @@
<content src="index.html" /> <content src="index.html" />
<allow-intent href="http://*/*" /> <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> <allow-intent href="https://*/*" />
<platform name="android">
<preference name="Scheme" value="http" />
</platform>
</widget> </widget>

28
package-lock.json generated

@ -9,7 +9,7 @@
"version": "1.0.0", "version": "1.0.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"cordova-android": "^10.1.2", "cordova-android": "^11.0.0",
"cordova-browser": "^6.0.0", "cordova-browser": "^6.0.0",
"cordova-electron": "^3.1.0" "cordova-electron": "^3.1.0"
} }
@ -1248,25 +1248,25 @@
"dev": true "dev": true
}, },
"node_modules/cordova-android": { "node_modules/cordova-android": {
"version": "10.1.2", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-10.1.2.tgz", "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-11.0.0.tgz",
"integrity": "sha512-F28+NvgKO4ZhKFkqctCOh62mhVoNyUuRQh/F/nqp+Sti4ODv2rUa6UeW18khhdYTjlDeihHQsPqxvB7mI6fVYA==", "integrity": "sha512-ZhvSF5BYY8gmrAu1PtMPdHFsRoom/emT4OtTcecmh3Zj22900y4Golg5whhBPcYcTPC7BU6PG/EmG9BBHcX9tQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"android-versions": "^1.7.0", "android-versions": "^1.7.0",
"cordova-common": "^4.0.2", "cordova-common": "^4.0.2",
"execa": "^5.1.1", "execa": "^5.1.1",
"fast-glob": "^3.2.7", "fast-glob": "^3.2.11",
"fs-extra": "^10.0.0", "fs-extra": "^10.1.0",
"is-path-inside": "^3.0.3", "is-path-inside": "^3.0.3",
"nopt": "^5.0.0", "nopt": "^5.0.0",
"properties-parser": "^0.3.1", "properties-parser": "^0.3.1",
"semver": "^7.3.5", "semver": "^7.3.7",
"untildify": "^4.0.0", "untildify": "^4.0.0",
"which": "^2.0.2" "which": "^2.0.2"
}, },
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=14.0.0"
} }
}, },
"node_modules/cordova-browser": { "node_modules/cordova-browser": {
@ -5807,20 +5807,20 @@
"dev": true "dev": true
}, },
"cordova-android": { "cordova-android": {
"version": "10.1.2", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-10.1.2.tgz", "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-11.0.0.tgz",
"integrity": "sha512-F28+NvgKO4ZhKFkqctCOh62mhVoNyUuRQh/F/nqp+Sti4ODv2rUa6UeW18khhdYTjlDeihHQsPqxvB7mI6fVYA==", "integrity": "sha512-ZhvSF5BYY8gmrAu1PtMPdHFsRoom/emT4OtTcecmh3Zj22900y4Golg5whhBPcYcTPC7BU6PG/EmG9BBHcX9tQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"android-versions": "^1.7.0", "android-versions": "^1.7.0",
"cordova-common": "^4.0.2", "cordova-common": "^4.0.2",
"execa": "^5.1.1", "execa": "^5.1.1",
"fast-glob": "^3.2.7", "fast-glob": "^3.2.11",
"fs-extra": "^10.0.0", "fs-extra": "^10.1.0",
"is-path-inside": "^3.0.3", "is-path-inside": "^3.0.3",
"nopt": "^5.0.0", "nopt": "^5.0.0",
"properties-parser": "^0.3.1", "properties-parser": "^0.3.1",
"semver": "^7.3.5", "semver": "^7.3.7",
"untildify": "^4.0.0", "untildify": "^4.0.0",
"which": "^2.0.2" "which": "^2.0.2"
} }

@ -13,15 +13,16 @@
"author": "Apache Cordova Team", "author": "Apache Cordova Team",
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"cordova-android": "^10.1.2", "cordova-android": "^11.0.0",
"cordova-browser": "^6.0.0", "cordova-browser": "^6.0.0",
"cordova-electron": "^3.1.0" "cordova-electron": "^3.1.0"
}, },
"cordova": { "cordova": {
"platforms": [ "platforms": [
"android",
"electron", "electron",
"browser" "browser",
] "android"
],
"plugins": {}
} }
} }

@ -11,6 +11,7 @@
<label>Compteur : </label> <label>Compteur : </label>
<label id="counter">{0}</label> <label id="counter">{0}</label>
<button id="increment" onclick="makeIncrement()">Incrémenter</button> <button id="increment" onclick="makeIncrement()">Incrémenter</button>
<button id="reload" onclick="window.location.reload()">recharger la page</button>
</div> </div>
<script src="/cordova.js"></script> <script src="/cordova.js"></script>

@ -1,50 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- <html lang="en">
Licensed to the Apache Software Foundation (ASF) under one <head>
or more contributor license agreements. See the NOTICE file <meta charset="UTF-8">
distributed with this work for additional information <script src="index.js"></script>
regarding copyright ownership. The ASF licenses this file <title>hello</title>
to you under the Apache License, Version 2.0 (the </head>
"License"); you may not use this file except in compliance <body onload="">
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 <div id="page">
<button onclick="window.location.href = 'counter/index.html'">aller au compteur</button>
</div>
Unless required by applicable law or agreed to in writing, <script src="/cordova.js"></script>
software distributed under the License is distributed on an </body>
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY </html>
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta charset="utf-8">
<!--
Customize this policy to fit your own app's needs. For more guidance, please refer to the docs:
https://cordova.apache.org/docs/en/latest/
Some notes:
* https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
* Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
* Enable inline JS: add 'unsafe-inline' to default-src
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
<meta name="color-scheme" content="light dark">
<link rel="stylesheet" href="css/index.css">
<title>Hello World</title>
</head>
<body>
<div class="app">
<h1>Apache Cordova</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
</div>
<script src="cordova.js"></script>
<script src="js/index.js"></script>
</body>
</html>
Loading…
Cancel
Save