kopia lustrzana https://github.com/dceejay/electron-node-red
update electron project flow slightly
rodzic
addefb39b7
commit
37f0f45ebe
File diff suppressed because one or more lines are too long
6
main.js
6
main.js
|
@ -3,9 +3,9 @@
|
|||
|
||||
// Some settings you can edit easily
|
||||
// Flows file name
|
||||
const flowfile = 'flows.json';
|
||||
const flowfile = 'electronflow.json';
|
||||
// Start on the dashboard page
|
||||
const url = "/ui";
|
||||
const url = "/ui/#/0";
|
||||
// url for the editor page
|
||||
const urledit = "/admin";
|
||||
// tcp port to use
|
||||
|
@ -150,7 +150,7 @@ function createWindow() {
|
|||
var webContents = mainWindow.webContents;
|
||||
webContents.on('did-get-response-details', function(event, status, newURL, originalURL, httpResponseCode) {
|
||||
if ((httpResponseCode == 404) && (newURL == ("http://localhost:"+listenPort+url))) {
|
||||
setTimeout(webContents.reload, 200);
|
||||
setTimeout(webContents.reload, 250);
|
||||
}
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
||||
});
|
||||
|
|
23
package.json
23
package.json
|
@ -7,9 +7,7 @@
|
|||
"start": "electron main.js",
|
||||
"test": "echo \" Warning: no test specified \"",
|
||||
"watch": "nodemon --exec \"npm run start\" --ext js,css,json --ignore build/",
|
||||
|
||||
"clean": "rm -rf ./build ../electron-bin && mkdir -p ./build ../electron-bin",
|
||||
|
||||
"pack": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --all --out=build --overwrite",
|
||||
"pack:osx": "electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=build --overwrite",
|
||||
"pack:linux32": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=ia32 --out=build --overwrite && cp afterinst.sh build/Node-RED-linux-ia32/",
|
||||
|
@ -17,7 +15,6 @@
|
|||
"pack:win32": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=ia32 --out=build --asar=true --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'",
|
||||
"pack:win64": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64 --out=build --asar=true --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'",
|
||||
"pack:armv7l": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=armv7l --out=build --overwrite && cp afterinst.sh build/Node-RED-linux-armv7l",
|
||||
|
||||
"build": "npm run clean && npm run build:osx && npm run build:linux64 && npm run build:linux32",
|
||||
"build:osx": "npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg",
|
||||
"build:linux32": "npm run pack:linux32 && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a i386 -p ../electron-bin -C build/Node-RED-linux-ia32 --prefix=/opt/node-red --after-install=afterinst.sh ./",
|
||||
|
@ -31,15 +28,15 @@
|
|||
"url": "git+https://github.com/dceejay/electron-node-red.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.15.3",
|
||||
"node-red": "*",
|
||||
"node-red-dashboard": "*",
|
||||
"node-red-contrib-play-audio": "*",
|
||||
"node-red-contrib-web-worldmap": "*",
|
||||
"node-red-dashboard": "*",
|
||||
"node-red-node-base64": "*",
|
||||
"node-red-node-geofence": "*",
|
||||
"node-red-node-random": "*",
|
||||
"node-red-node-smooth": "*",
|
||||
"node-red-contrib-play-audio": "*",
|
||||
"node-red-node-base64": "*",
|
||||
"express": "^4.15.4"
|
||||
"node-red-node-smooth": "*"
|
||||
},
|
||||
"keywords": [
|
||||
"electron",
|
||||
|
@ -47,8 +44,12 @@
|
|||
"node-red"
|
||||
],
|
||||
"contributors": [
|
||||
{"name":"Dave Conway-Jones"},
|
||||
{"name":"Nathanaël Lécaudé"}
|
||||
{
|
||||
"name": "Dave Conway-Jones"
|
||||
},
|
||||
{
|
||||
"name": "Nathanaël Lécaudé"
|
||||
}
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
|
@ -56,7 +57,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/dceejay/electron-node-red#readme",
|
||||
"devDependencies": {
|
||||
"electron": "1.6.11",
|
||||
"electron": "1.7.9",
|
||||
"electron-rebuild": "*",
|
||||
"electron-squirrel-startup": "*",
|
||||
"electron-winstaller": "2.5.2"
|
||||
|
|
Ładowanie…
Reference in New Issue