kopia lustrzana https://github.com/dceejay/electron-node-red
general tidy up - update
rodzic
cd81a3a6ed
commit
cc1e9e41df
|
@ -23,6 +23,7 @@ coverage
|
||||||
build/Release
|
build/Release
|
||||||
dist/*
|
dist/*
|
||||||
lib/*
|
lib/*
|
||||||
|
build/*
|
||||||
|
|
||||||
# Dependency directory
|
# Dependency directory
|
||||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||||
|
@ -31,4 +32,6 @@ node_modules
|
||||||
.flows.json.backup
|
.flows.json.backup
|
||||||
.sessions.json
|
.sessions.json
|
||||||
*darwin-x64*
|
*darwin-x64*
|
||||||
|
*linux-x64*
|
||||||
*win32-x64*
|
*win32-x64*
|
||||||
|
*.back
|
||||||
|
|
22
README.md
22
README.md
|
@ -10,13 +10,21 @@ To clone and run this repository you'll need [Git](https://git-scm.com) and [Nod
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone this repository
|
# Clone this repository
|
||||||
git clone https://github.com/natcl/electron-node-red.git
|
git clone https://github.com/dceejay/electron-node-red.git
|
||||||
# Go into the repository
|
# Go into the repository
|
||||||
cd electron-node-red
|
cd electron-node-red
|
||||||
# Install dependencies and run the app
|
# Install dependencies and run the app
|
||||||
npm install && npm start
|
npm install && npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## TLDR
|
||||||
|
|
||||||
|
Then run `npm run pack` to create packages for all platforms
|
||||||
|
or `npm run build` to build a .dmg file for OSX and deb files for linux (32 and 64bit).
|
||||||
|
or `npm run build:osx` to just build for osx.
|
||||||
|
|
||||||
|
Builds are created in the `build` directory. Runtimes are created in the `dist` directory.
|
||||||
|
|
||||||
## Packaging your application
|
## Packaging your application
|
||||||
|
|
||||||
If you want to distribute executables of this project, the easiest way is to use electron-packager:
|
If you want to distribute executables of this project, the easiest way is to use electron-packager:
|
||||||
|
@ -25,13 +33,13 @@ If you want to distribute executables of this project, the easiest way is to use
|
||||||
sudo npm install -g electron-packager
|
sudo npm install -g electron-packager
|
||||||
|
|
||||||
# build for OS X 64 bits
|
# build for OS X 64 bits
|
||||||
electron-packager electron-node-red Node-RED --icon=nodered.icns --platform=darwin --arch=x64
|
electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64
|
||||||
|
|
||||||
# build for Windows 64 bits
|
# build for Windows 64 bits
|
||||||
electron-packager electron-node-red Node-RED --icon=nodered.icns --platform=win32 --arch=x64
|
electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64
|
||||||
|
|
||||||
# build for Linux 64 bits
|
# build for Linux 64 bits
|
||||||
electron-packager electron-node-red Node-RED --icon=nodered.icns --platform=linux --arch=x64
|
electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64
|
||||||
```
|
```
|
||||||
|
|
||||||
Learn more about Electron and its API in the [documentation](http://electron.atom.io/docs/latest).
|
Learn more about Electron and its API in the [documentation](http://electron.atom.io/docs/latest).
|
||||||
|
@ -41,6 +49,8 @@ Learn more about Electron and its API in the [documentation](http://electron.ato
|
||||||
|
|
||||||
look at `https://github.com/LinusU/node-appdmg`
|
look at `https://github.com/LinusU/node-appdmg`
|
||||||
|
|
||||||
|
sudo npm install -g appdmg
|
||||||
|
|
||||||
appdmg appdmg.json ~/Desktop/NodeRED.dmg
|
appdmg appdmg.json ~/Desktop/NodeRED.dmg
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,8 +58,8 @@ look at `https://github.com/LinusU/node-appdmg`
|
||||||
|
|
||||||
look at `https://github.com/jordansissel/fpm`
|
look at `https://github.com/jordansissel/fpm`
|
||||||
|
|
||||||
fpm -s dir -t deb -f -n node-red-electron -v 0.13.4 -m your-email@example.com -a i386 Node-RED-linux-ia32/
|
fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m your-email@example.com -a i386 Node-RED-linux-ia32/
|
||||||
fpm -s dir -t deb -f -n node-red-electron -v 0.13.4 -m your-email@example.com -a x86_64 Node-RED-linux-x64/
|
fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m your-email@example.com -a x86_64 Node-RED-linux-x64/
|
||||||
|
|
||||||
|
|
||||||
#### License [CC0 (Public Domain)](LICENSE.md)
|
#### License [CC0 (Public Domain)](LICENSE.md)
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
"icon-size": 80,
|
"icon-size": 80,
|
||||||
"contents": [
|
"contents": [
|
||||||
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
|
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
|
||||||
{ "x": 192, "y": 344, "type": "file", "path": "dist/Node-RED-darwin-x64/Node-RED.app" }
|
{ "x": 192, "y": 344, "type": "file", "path": "build/Node-RED-darwin-x64/Node-RED.app" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
22
package.json
22
package.json
|
@ -7,19 +7,21 @@
|
||||||
"start": "electron main.js",
|
"start": "electron main.js",
|
||||||
"test": "echo \" Warning: no test specified \"",
|
"test": "echo \" Warning: no test specified \"",
|
||||||
|
|
||||||
"clean": "rm -rf ./dist ",
|
"clean": "rm -rf ./dist ./build && mkdir -p ./dist",
|
||||||
|
|
||||||
"pack": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --all --out=dist",
|
"pack": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --all --out=build",
|
||||||
"pack:osx": "electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=dist",
|
"pack:osx": "electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=build",
|
||||||
"pack:win": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64 --out=dist",
|
"pack:win": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64 --out=build",
|
||||||
"pack:win32": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=ia32 --out=dist",
|
"pack:win32": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=ia32 --out=build",
|
||||||
"pack:linux": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=dist",
|
"pack:linux": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build",
|
||||||
"pack:linux32": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=ia32 --out=dist",
|
"pack:linux32": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=ia32 --out=build",
|
||||||
|
"pack:armv7l": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=armv7l --out=build",
|
||||||
|
|
||||||
"build": "npm run build:osx",
|
"build": "npm run build:osx && npm run build:linux && npm run build:linux32",
|
||||||
"build:osx": "npm run pack && appdmg appdmg.json dist/Node-RED.dmg",
|
"build:osx": "npm run pack && appdmg appdmg.json dist/Node-RED.dmg",
|
||||||
"build:linux32": "npm run pack:linux32 && fpm -s dir -t deb -f -n node-red-electron -v 0.13.4 -m conway@uk.ibm.com -a i386 -p dist dist/Node-RED-linux-ia32/",
|
"build:linux32": "npm run pack:linux32 && fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m conway@uk.ibm.com -a i386 -p dist build/Node-RED-linux-ia32/",
|
||||||
"build:linux": "npm run pack:linux && fpm -s dir -t deb -f -n node-red-electron -v 0.13.4 -m conway@uk.ibm.com -a x86_64 -p dist dist/Node-RED-linux-x64/"
|
"build:linux": "npm run pack:linux && fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m conway@uk.ibm.com -a x86_64 -p dist build/Node-RED-linux-x64/",
|
||||||
|
"build:armv7l": "npm run pack:armv7l && fpm -s dir -t deb -f -n node-red-electron -v 0.15.2 -m conway@uk.ibm.com -a armv7l -p dist build/Node-RED-linux-armv7l/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Ładowanie…
Reference in New Issue