major upgrade to latest electron and builder
still need to do readme and mergepull/9/head
|
@ -1,32 +1,7 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
dist/*
|
||||
lib/*
|
||||
build/*
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
.config.json
|
||||
.flows.json.backup
|
||||
|
@ -37,3 +12,6 @@ node_modules
|
|||
*.back
|
||||
.config.json.backup
|
||||
*.backup
|
||||
*lock*
|
||||
logs
|
||||
*.log
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ln -s /opt/node-red/Node-RED /usr/bin/Node-RED
|
|
@ -1 +0,0 @@
|
|||
rm -f /usr/bin/Node-RED
|
10
appdmg.json
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"title": "Node-RED Electron installer",
|
||||
"icon": "nodered.icns",
|
||||
"background": "appbkg.png",
|
||||
"icon-size": 80,
|
||||
"contents": [
|
||||
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
|
||||
{ "x": 192, "y": 344, "type": "file", "path": "build/Node-RED-darwin-x64/Node-RED.app" }
|
||||
]
|
||||
}
|
Przed Szerokość: | Wysokość: | Rozmiar: 75 KiB Po Szerokość: | Wysokość: | Rozmiar: 75 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 22 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 37 KiB |
21
buildall
|
@ -1,21 +0,0 @@
|
|||
npm i
|
||||
# cd node_modules/electron-winstaller
|
||||
# npm i is-property
|
||||
# cd ../..
|
||||
rm -rf node_modules/node-red/node_modules/node-red-node-serialport node_modules/node-red/node_modules/node-red-node-feedparser node_modules/node-red/node_modules/node-red-node-email
|
||||
# ./node_modules/.bin/electron-rebuild node_modules/serialport/build
|
||||
$(npm bin)/electron-rebuild
|
||||
|
||||
npm run clean
|
||||
npm run build:osx
|
||||
rm -rf build/
|
||||
npm run build:linux32
|
||||
rm -rf build/
|
||||
npm run build:linux64
|
||||
# rm -rf build/
|
||||
# npm run build:armv7l
|
||||
rm -rf build/
|
||||
npm run build:win32
|
||||
rm -rf build/ ../electron-bin/*.nupkg ../electron-bin/RELEASES
|
||||
npm run build:win64
|
||||
rm -rf build/ ../electron-bin/*.nu* ../electron-bin/RELEASES
|
13
console.htm
|
@ -5,15 +5,8 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Node-RED Console</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
|
||||
</head>
|
||||
<body style="margin:0;" onload="scrollDown()" >
|
||||
<font style="font-family:'Helvetica Neue', Arial, Helvetica, sans-serif; font-size:9pt;">
|
||||
<div id="header" style="background-color:#910000; position:fixed; height:16px; width:100%; padding:8px;"><input type="button" value="Clear Log" onclick="clearList()";/></div>
|
||||
<div id="debug" style="padding:4px; padding-left:8px; padding-top:34px;"></div>
|
||||
</font>
|
||||
<script>
|
||||
const logLength = 250;
|
||||
const { ipcRenderer } = require('electron');
|
||||
const ipc = require('electron').ipcRenderer;
|
||||
var list = [];
|
||||
var scrollDown = function() {
|
||||
|
@ -37,5 +30,11 @@
|
|||
window.scrollTo(0,document.body.scrollHeight);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0;" onload="scrollDown()" >
|
||||
<font style="font-family:'Helvetica Neue', Arial, Helvetica, sans-serif; font-size:9pt;">
|
||||
<div id="header" style="background-color:#910000; position:fixed; height:16px; width:100%; padding:8px;"><input type="button" value="Clear Log" onclick="clearList()";/></div>
|
||||
<div id="debug" style="padding:4px; padding-left:8px; padding-top:34px;"></div>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
docker run --rm -ti --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine && yarn && yarn dist
|
260
main.js
|
@ -3,7 +3,7 @@
|
|||
|
||||
// Some settings you can edit easily
|
||||
|
||||
const editable = true; // Set this to false to create a run only application - no editor/no console
|
||||
const editable = true; // Set this to false to create a run only application - no editor/no console
|
||||
const allowLoadSave = false; // set to true to allow omport and export of flow
|
||||
const showMap = false; // set to true to add Worldmap to the menu
|
||||
let flowfile = 'electronflow.json'; // default Flows file name - loaded at start
|
||||
|
@ -11,6 +11,7 @@ const urldash = "/ui/#/0"; // Start on the dashboard page
|
|||
const urledit = "/red"; // url for the editor page
|
||||
const urlconsole = "/console.htm"; // url for the console page
|
||||
const urlmap = "/worldmap"; // url for the worldmap
|
||||
const nrIcon = "nodered.png" // Icon for the app in root dir (usually 256x256)
|
||||
|
||||
// tcp port to use
|
||||
//const listenPort = "18880"; // fix it if you like
|
||||
|
@ -24,14 +25,10 @@ const http = require('http');
|
|||
const express = require("express");
|
||||
const electron = require('electron');
|
||||
|
||||
const app = electron.app;
|
||||
const {app, Menu} = electron;
|
||||
const ipc = electron.ipcMain;
|
||||
const dialog = electron.dialog;
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const {Menu, MenuItem} = electron;
|
||||
|
||||
// this should be placed at top of main.js to handle squirrel setup events quickly
|
||||
if (handleSquirrelEvent()) { return; }
|
||||
|
||||
var RED = require("node-red");
|
||||
var red_app = express();
|
||||
|
@ -94,11 +91,13 @@ let mainWindow;
|
|||
let conWindow;
|
||||
let logBuffer = [];
|
||||
let logLength = 250; // No. of lines of console log to keep.
|
||||
const levels = [ "", "fatal", "error", "warn", "info", "debug", "trace" ];
|
||||
|
||||
ipc.on('clearLogBuffer', function(event, arg) { logBuffer = []; });
|
||||
|
||||
// Create the settings object - see default settings.js file for other options
|
||||
var settings = {
|
||||
uiHost: "127.0.0.1", // only allow local connections
|
||||
httpAdminRoot: "/red", // set to false to disable editor/deploy
|
||||
httpNodeRoot: "/",
|
||||
userDir: userdir,
|
||||
|
@ -114,7 +113,13 @@ var settings = {
|
|||
if (editable) { // No logging if not editable
|
||||
var ts = (new Date(msg.timestamp)).toISOString();
|
||||
ts = ts.replace("Z"," ").replace("T"," ");
|
||||
var line = ts+" : "+msg.msg;
|
||||
var line = "";
|
||||
if (msg.type && msg.id) {
|
||||
line = ts+" : ["+levels[msg.level/10]+"] ["+msg.type+":"+msg.id+"] "+msg.msg;
|
||||
}
|
||||
else {
|
||||
line = ts+" : ["+levels[msg.level/10]+"] "+msg.msg;
|
||||
}
|
||||
logBuffer.push(line);
|
||||
if (conWindow) { conWindow.webContents.send('debugMsg', line); }
|
||||
if (logBuffer.length > logLength) { logBuffer.shift(); }
|
||||
|
@ -127,7 +132,7 @@ var settings = {
|
|||
if (!editable) {
|
||||
settings.httpAdminRoot = false;
|
||||
settings.readOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialise the runtime with a server and settings
|
||||
RED.init(server,settings);
|
||||
|
@ -141,95 +146,83 @@ if (settings.httpAdminRoot !== false) {
|
|||
red_app.use(settings.httpNodeRoot,RED.httpNode);
|
||||
|
||||
// Create the Application's main menu
|
||||
var template = [
|
||||
// {label: "Application",
|
||||
// submenu: [
|
||||
// //{ role: 'about' },
|
||||
// //{ type: "separator" },
|
||||
// { role: 'togglefullscreen' },
|
||||
// { role: 'quit' }
|
||||
// ]},
|
||||
var template = [];
|
||||
if (process.platform === 'darwin') {
|
||||
template.push( {
|
||||
label: app.getName(),
|
||||
submenu: [
|
||||
{ type: 'separator' },
|
||||
{ type: 'separator' },
|
||||
{ role: 'about' },
|
||||
{ type: 'separator' },
|
||||
{ role: 'hide' },
|
||||
{ role: 'hideothers' },
|
||||
{ role: 'unhide' },
|
||||
{ type: 'separator' },
|
||||
{ role: 'togglefullscreen' },
|
||||
{ role: 'quit' }
|
||||
]
|
||||
} )
|
||||
}
|
||||
template.push(
|
||||
{ label: 'Node-RED',
|
||||
submenu: [
|
||||
{ type: 'separator' },
|
||||
{ type: 'separator' },
|
||||
{ label: 'Import Flow',
|
||||
accelerator: "Shift+CmdOrCtrl+O",
|
||||
click() { openFlow(); }
|
||||
},
|
||||
{ label: 'Save Flow As',
|
||||
accelerator: "Shift+CmdOrCtrl+S",
|
||||
click() { saveFlow(); }
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{ label: 'Console',
|
||||
accelerator: "Shift+CmdOrCtrl+C",
|
||||
click() { createConsole(); }
|
||||
},
|
||||
{ label: 'Dashboard',
|
||||
accelerator: "Shift+CmdOrCtrl+D",
|
||||
click() { mainWindow.loadURL("http://localhost:"+listenPort+urldash); }
|
||||
},
|
||||
{ label: 'Editor',
|
||||
accelerator: "Shift+CmdOrCtrl+E",
|
||||
click() { mainWindow.loadURL("http://localhost:"+listenPort+urledit); }
|
||||
},
|
||||
{ label: 'Worldmap',
|
||||
accelerator: "Shift+CmdOrCtrl+M",
|
||||
click() { mainWindow.loadURL("http://localhost:"+listenPort+urlmap); }
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{ label: 'Documentation',
|
||||
click() { electron.shell.openExternal('https://nodered.org/docs') }
|
||||
},
|
||||
{ label: 'Flows and Nodes',
|
||||
click() { electron.shell.openExternal('https://flows.nodered.org') }
|
||||
},
|
||||
{ label: 'Discourse Forum',
|
||||
click() { electron.shell.openExternal('https://discourse.nodered.org/') }
|
||||
},
|
||||
{ type: "separator" },
|
||||
{ role: 'togglefullscreen' },
|
||||
{ role: 'quit' }
|
||||
]}
|
||||
// ,{label: "Edit",
|
||||
// submenu: [
|
||||
// { label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
|
||||
// { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
|
||||
// { type: "separator" },
|
||||
// { label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
|
||||
// { label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
|
||||
// { label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
|
||||
// { label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" }
|
||||
// ]}
|
||||
// ,{ label: 'View',
|
||||
// submenu: [
|
||||
// { label: 'Reload',
|
||||
// accelerator: 'CmdOrCtrl+R',
|
||||
// click(item, focusedWindow) { if (focusedWindow) { focusedWindow.reload(); }}
|
||||
// },
|
||||
// { label: 'Toggle Developer Tools',
|
||||
// accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
|
||||
// click(item, focusedWindow) { if (focusedWindow) { focusedWindow.webContents.toggleDevTools(); }}
|
||||
// },
|
||||
// { type: 'separator' },
|
||||
// { role: 'resetzoom' },
|
||||
// { role: 'zoomin' },
|
||||
// { role: 'zoomout' },
|
||||
// { type: 'separator' },
|
||||
// { role: 'togglefullscreen' },
|
||||
// { role: 'minimize' }
|
||||
// ]}
|
||||
];
|
||||
submenu: [
|
||||
{ label: 'Import Flow',
|
||||
accelerator: "Shift+CmdOrCtrl+O",
|
||||
click() { openFlow(); }
|
||||
},
|
||||
{ label: 'Save Flow As',
|
||||
accelerator: "Shift+CmdOrCtrl+S",
|
||||
click() { saveFlow(); }
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{ label: 'Console',
|
||||
accelerator: "Shift+CmdOrCtrl+C",
|
||||
click() { createConsole(); }
|
||||
},
|
||||
{ label: 'Dashboard',
|
||||
accelerator: "Shift+CmdOrCtrl+D",
|
||||
click() { mainWindow.loadURL("http://localhost:"+listenPort+urldash); }
|
||||
},
|
||||
{ label: 'Editor',
|
||||
accelerator: "Shift+CmdOrCtrl+E",
|
||||
click() { mainWindow.loadURL("http://localhost:"+listenPort+urledit); }
|
||||
},
|
||||
{ label: 'Worldmap',
|
||||
accelerator: "Shift+CmdOrCtrl+M",
|
||||
click() { mainWindow.loadURL("http://localhost:"+listenPort+urlmap); }
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{ type: 'separator' },
|
||||
{ label: 'Documentation',
|
||||
click() { electron.shell.openExternal('https://nodered.org/docs') }
|
||||
},
|
||||
{ label: 'Flows and Nodes',
|
||||
click() { electron.shell.openExternal('https://flows.nodered.org') }
|
||||
},
|
||||
{ label: 'Discourse Forum',
|
||||
click() { electron.shell.openExternal('https://discourse.nodered.org/') }
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
if (!showMap) { template[0].submenu.splice(8,1); }
|
||||
|
||||
if (!editable) {
|
||||
template[0].submenu.splice(3,1);
|
||||
template[0].submenu.splice(4,1);
|
||||
var tempNum = template.length - 1;
|
||||
// Add quit and toggle full screen to this menu if not on Mac
|
||||
if (process.platform !== 'darwin') {
|
||||
template[tempNum].submenu.push({ type: "separator" });
|
||||
template[tempNum].submenu.push({ role: 'togglefullscreen' });
|
||||
template[tempNum].submenu.push({ role: 'quit' });
|
||||
}
|
||||
|
||||
if (!allowLoadSave) { template[0].submenu.splice(0,2); }
|
||||
if (!showMap) { template[tempNum].submenu.splice(8,1); }
|
||||
|
||||
if (!editable) {
|
||||
template[tempNum].submenu.splice(3,1);
|
||||
template[tempNum].submenu.splice(4,1);
|
||||
}
|
||||
|
||||
if (!allowLoadSave) { template[tempNum].submenu.splice(0,2); }
|
||||
|
||||
let fileName = "";
|
||||
function saveFlow() {
|
||||
|
@ -243,7 +236,7 @@ function saveFlow() {
|
|||
if (err) { dialog.showErrorBox('Error', err); }
|
||||
else {
|
||||
dialog.showMessageBox({
|
||||
icon: "nodered.png",
|
||||
icon: nrIcon,
|
||||
message:"Flow file saved as\n\n"+file_path,
|
||||
buttons: ["OK"]
|
||||
});
|
||||
|
@ -286,11 +279,14 @@ function createConsole() {
|
|||
title: "Node-RED Console",
|
||||
width: 800,
|
||||
height: 600,
|
||||
icon: path.join(__dirname, 'nodered.png'),
|
||||
autoHideMenuBar: true
|
||||
icon: path.join(__dirname, nrIcon),
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
});
|
||||
conWindow.loadURL(url.format({
|
||||
pathname: path.join(__dirname, 'console.htm'),
|
||||
pathname: path.join(__dirname, urlconsole),
|
||||
protocol: 'file:',
|
||||
slashes: true
|
||||
}))
|
||||
|
@ -310,13 +306,16 @@ function createWindow() {
|
|||
//titleBarStyle: "hidden",
|
||||
width: 1024,
|
||||
height: 768,
|
||||
icon: path.join(__dirname, 'nodered.png'),
|
||||
icon: path.join(__dirname, nrIcon),
|
||||
fullscreenable: true,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: false
|
||||
}
|
||||
});
|
||||
const menu = Menu.buildFromTemplate(template);
|
||||
Menu.setApplicationMenu(menu);
|
||||
|
||||
mainWindow.loadURL(`file://${__dirname}/load.html`);
|
||||
//if (process.platform !== 'darwin') { mainWindow.setAutoHideMenuBar(true); }
|
||||
|
||||
|
@ -324,7 +323,6 @@ function createWindow() {
|
|||
if ((httpResponseCode == 404) && (newURL == ("http://localhost:"+listenPort+urldash))) {
|
||||
setTimeout(mainWindow.webContents.reload, 250);
|
||||
}
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
||||
});
|
||||
|
||||
// mainWindow.webContents.on('did-finish-load', () => {
|
||||
|
@ -354,6 +352,10 @@ function createWindow() {
|
|||
//mainWindow.webContents.openDevTools();
|
||||
}
|
||||
|
||||
app.on('orderFrontStandardAboutPanel', function() {
|
||||
createConsole();
|
||||
});
|
||||
|
||||
// Called when Electron has finished initialization and is ready to create browser windows.
|
||||
app.on('ready', createWindow );
|
||||
|
||||
|
@ -378,62 +380,4 @@ RED.start().then(function() {
|
|||
server.listen(listenPort,"127.0.0.1",function() {
|
||||
mainWindow.loadURL("http://127.0.0.1:"+listenPort+urldash);
|
||||
});
|
||||
});
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// All this Squirrel stuff is for the Windows installer
|
||||
function handleSquirrelEvent() {
|
||||
if (process.argv.length === 1) { return false; }
|
||||
|
||||
const path = require('path');
|
||||
const ChildProcess = require('child_process');
|
||||
const appFolder = path.resolve(process.execPath, '..');
|
||||
const rootAtomFolder = path.resolve(appFolder, '..');
|
||||
const updateDotExe = path.resolve(path.join(rootAtomFolder, 'Update.exe'));
|
||||
const exeName = path.basename(process.execPath);
|
||||
const spawn = function(command, args) {
|
||||
let spawnedProcess, error;
|
||||
|
||||
try { spawnedProcess = ChildProcess.spawn(command, args, {detached: true}); }
|
||||
catch (error) {}
|
||||
return spawnedProcess;
|
||||
};
|
||||
|
||||
const spawnUpdate = function(args) {
|
||||
return spawn(updateDotExe, args);
|
||||
};
|
||||
|
||||
const squirrelEvent = process.argv[1];
|
||||
switch (squirrelEvent) {
|
||||
case '--squirrel-install':
|
||||
case '--squirrel-updated':
|
||||
// Optionally do things such as:
|
||||
// - Add your .exe to the PATH
|
||||
// - Write to the registry for things like file associations and
|
||||
// explorer context menus
|
||||
|
||||
// Install desktop and start menu shortcuts
|
||||
spawnUpdate(['--createShortcut', exeName]);
|
||||
|
||||
setTimeout(app.quit, 1000);
|
||||
return true;
|
||||
|
||||
case '--squirrel-uninstall':
|
||||
// Undo anything you did in the --squirrel-install and
|
||||
// --squirrel-updated handlers
|
||||
|
||||
// Remove desktop and start menu shortcuts
|
||||
spawnUpdate(['--removeShortcut', exeName]);
|
||||
|
||||
setTimeout(app.quit, 1000);
|
||||
return true;
|
||||
|
||||
case '--squirrel-obsolete':
|
||||
// This is called on the outgoing version of your app before
|
||||
// we update to the new version - it's the opposite of
|
||||
// --squirrel-updated
|
||||
|
||||
app.quit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
BIN
nodered.ico
Przed Szerokość: | Wysokość: | Rozmiar: 34 KiB |
BIN
nodered.png
Przed Szerokość: | Wysokość: | Rozmiar: 1.3 KiB Po Szerokość: | Wysokość: | Rozmiar: 22 KiB |
74
package.json
|
@ -1,27 +1,14 @@
|
|||
{
|
||||
"name": "electron_node_red",
|
||||
"version": "1.0.2",
|
||||
"description": "Electron Node-RED application starter",
|
||||
"description": "Electron Node-RED application starter kit for development",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"pack": "electron-builder --dir",
|
||||
"dist": "electron-builder",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"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 after*.sh build/Node-RED-linux-ia32/",
|
||||
"pack:linux64": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build --overwrite && cp after*.sh build/Node-RED-linux-x64",
|
||||
"pack:win32": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=ia32 --out=build --asar --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 --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 --after-remove=afterremove.sh ./",
|
||||
"build:linux64": "npm run pack:linux64 && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a x86_64 -p ../electron-bin -C build/Node-RED-linux-x64 --prefix=/opt/node-red --after-install=afterinst.sh --after-remove=afterremove.sh ./",
|
||||
"build:win32": "npm run pack:win32 && node makewin32.js",
|
||||
"build:win64": "npm run pack:win64 && node makewin64.js",
|
||||
"build:armv7l": "npm run pack:armv7l && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a armv7l -p ../electron-bin -C build/Node-RED-linux-armv7l --prefix=/opt/node-red --after-install=afterinst.sh ./"
|
||||
"test": "echo \" Warning: no test specified \""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -31,12 +18,11 @@
|
|||
"express": "~4.17.1",
|
||||
"node-red": "1.0.2",
|
||||
"node-red-contrib-play-audio": "*",
|
||||
"node-red-contrib-web-worldmap": "*",
|
||||
"node-red-dashboard": "*",
|
||||
"node-red-contrib-web-worldmap": "~2.1.4",
|
||||
"node-red-dashboard": "~2.17.1",
|
||||
"node-red-node-base64": "*",
|
||||
"node-red-node-geofence": "*",
|
||||
"node-red-node-random": "*",
|
||||
"node-red-node-serialport": "*",
|
||||
"node-red-node-smooth": "*"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -44,23 +30,45 @@
|
|||
"quick start",
|
||||
"node-red"
|
||||
],
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Dave Conway-Jones"
|
||||
},
|
||||
{
|
||||
"name": "Nathanaël Lécaudé"
|
||||
}
|
||||
],
|
||||
"author": {
|
||||
"name": "Dave Conway-Jones",
|
||||
"email": "dceejay@gmail.com"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dceejay/electron-node-red/issues"
|
||||
},
|
||||
"homepage": "https://github.com/dceejay/electron-node-red#readme",
|
||||
"devDependencies": {
|
||||
"electron": "~2.0.18",
|
||||
"electron-rebuild": "~1.8.6",
|
||||
"electron-squirrel-startup": "*",
|
||||
"electron-winstaller": "2.5.2"
|
||||
"electron": "~6.0.12",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-create-menu": "^3.0.0"
|
||||
},
|
||||
"build": {
|
||||
"npmRebuild": false,
|
||||
"appId": "com.electron.node-red",
|
||||
"productName": "Node-RED",
|
||||
"copyright": "Copyright © 2019 D.Conway-Jones",
|
||||
"mac": {
|
||||
"category": "public.app-category.developer-tools"
|
||||
},
|
||||
"linux": {
|
||||
"target": [
|
||||
"deb",
|
||||
"rpm"
|
||||
],
|
||||
"synopsis": "Node-RED Low Code development",
|
||||
"category": "Development"
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
{
|
||||
"target": "msi",
|
||||
"arch": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|