Skip to content

Commit

Permalink
Remove abandoned & outdated Cordova code
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Feb 29, 2024
1 parent 1d22ce7 commit e7d54b3
Show file tree
Hide file tree
Showing 62 changed files with 12 additions and 1,619 deletions.
5 changes: 0 additions & 5 deletions bundles/org.openhab.ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Change to the `web` directory, gather the necessary dependencies with `npm insta

* `npm start` - run the development server (see below)
* `npm run build-prod` - build web app for production (note: no need to prepare a production version when submitting a PR, the build server will do it)
* `npm run build-cordova-prod` - build cordova's `www` folder from source and build a Cordova app
* `npm run dev` - run the development server (same as above)
* `npm run dev:blockly` - run the development server with Blockly source-maps (allows Blockly debugging)
* `npm run test:unit` - start the Jest test runner and run the unit tests
Expand Down Expand Up @@ -87,10 +86,6 @@ The "How do I..." and "Quick Start" sections are created from JSON definitions l

This is a PWA. Don't forget to check what is inside your `service-worker.js`. It is also recommended that you disable the service worker (or enable "Update on reload") in your browser's dev tools during development.

## Cordova

The Cordova project is located in the `cordova` folder. You shouldn't modify content of the `cordova/www` folder. Its content will be correctly generated when you call `npm run build-cordova-prod` (see [NPM Scripts](#npm-scripts)).

## Documentation & Resources

The openHAB docs provide a [Component Reference](https://www.openhab.org/docs/ui/components/) as well as docs for each component.
Expand Down
1 change: 0 additions & 1 deletion bundles/org.openhab.ui/web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module.exports = {

globals: {
'ga': true, // Google Analytics
'cordova': true,
'__statics': true,
'process': true
},
Expand Down
1 change: 0 additions & 1 deletion bundles/org.openhab.ui/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ stats
node
report.html
stats.json
# cordova
3 changes: 1 addition & 2 deletions bundles/org.openhab.ui/web/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ const config = require('./webpack.config.js');

const env = process.env.NODE_ENV || 'development';
const target = process.env.TARGET || 'web';
const isCordova = target === 'cordova'

const spinner = ora(env === 'production' ? 'building for production...' : 'building development version...');
spinner.start();

rm(isCordova ? './cordova/www' : './www/', (removeErr) => {
rm('./www/', (removeErr) => {
if (removeErr) throw removeErr;

webpack(config, (err, stats) => {
Expand Down
7 changes: 3 additions & 4 deletions bundles/org.openhab.ui/web/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function resolvePath(dir) {
const env = process.env.NODE_ENV || 'development'
const target = process.env.TARGET || 'web'
const buildSourceMaps = process.env.SOURCE_MAPS || false
const isCordova = target === 'cordova'

const apiBaseUrl = process.env.OH_APIBASE || 'http://localhost:8080'

Expand All @@ -32,7 +31,7 @@ module.exports = {
'./src/js/app.js'
],
output: {
path: resolvePath(isCordova ? 'cordova/www' : 'www'),
path: resolvePath('www'),
filename: 'js/app.[contenthash].js',
publicPath: '/',
hotUpdateChunkFilename: 'hot/[id].[fullhash].hot-update.js',
Expand Down Expand Up @@ -253,7 +252,7 @@ module.exports = {
patterns: [
{
from: resolvePath('src/res'),
to: resolvePath(isCordova ? 'cordova/www/res' : 'www/res')
to: resolvePath('www/res')
},
{
from: resolvePath('src/manifest.json'),
Expand All @@ -265,7 +264,7 @@ module.exports = {
}
]
}),
...(!isCordova && env === 'production' ? [
...(env === 'production' ? [
new WorkboxPlugin.InjectManifest({
swSrc: resolvePath('src/service-worker.js'),
maximumFileSizeToCacheInBytes: 100000000,
Expand Down
13 changes: 0 additions & 13 deletions bundles/org.openhab.ui/web/cordova/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions bundles/org.openhab.ui/web/cordova/.npmignore

This file was deleted.

94 changes: 0 additions & 94 deletions bundles/org.openhab.ui/web/cordova/config.xml

This file was deleted.

23 changes: 0 additions & 23 deletions bundles/org.openhab.ui/web/cordova/hooks/README.md

This file was deleted.

0 comments on commit e7d54b3

Please sign in to comment.