cmd2app
| Install | |
|---|---|
npm install cmd2app |
|
| Latest Version: | 1.22.0 |
| Vue: | 1 |
| License: | ISC |
| Last Updated: | Nov 22, 2016 |
| Links: | npm |
cmd2app - Convert you command line client to electron app.
Install
(sudo) npm install cmd2app -g
How to convert?
-
Complete your command line client.
-
Add some field to
package.jsonto describe your command line client.All options as follow example.
/* package.json */ { "name": "cmd2app example", // ... "cmd2app" : { "repository": "https://github.com/gomeplusFED/meixin-h5-proxy", // your repo address "title": "美信H5 CDN代理模块", // title your want to show "bin": ["proxy", "test"], // bin entrance "globalOptions": { // global options "dir": { // option detail "desc": "the catalog to be proxyed" // option desc }, "port": { "desc": "http portal, default 80" }, "ports": { "desc": "https portal, default 443" }, "foreign": { "desc": "public dependencies path" }, "path": { "desc": "middle path,default /m/app/src" }, "raw": { "desc": "raw path" } }, "command": { // command "new": { // key "params": [{ //parmas "desc": "repo address" // params desc }, { "desc": "local path" }], "options": { // command options "con": { "desc": "con desc" }, "abc": { "desc": "abc desc" } }, "desc": "this is test cmd" // command desc }, "test": { "params": [{ "desc": "test params" }], "options": { "dir": "the catalog to be proxyed" }, "desc": "# create a new app with an official repo" } } } }For example.
bin + global options
proxy --dir="/c" --path="/b" --foreign="/a" --port=8011proxy -> bin
dir/path/foreign/port -> global optionsbin + global options + command + command options
proxy --port=8001 new a b --con=123proxy -> bin
port -> global option
new -> command
a -> command params 1
b -> command params 2
con -> command option -
Use
cmd2appto build your app.(sudo) npm install cmd2app -g cmd2app new [author/repo] [path] cd [path] && npm install electron [path]/src/main/app.babel.js # you should global install electronNote:
-
Final file not a full app, it's just source code what can run by
electron. -
If you want run your app, you should install electron environment, and use some package tools to package your app, like electron-builder / electron-packager and so on.
-
Also, you can wrap your app further to a plugin for FET. FET is a plugin plataform, you can easily wrap your app to a plugin. More in here
-
Some images .
-
Main
-
With all options
-
Run
-
Run result
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.22.0 | ^1.0.26 | ISC | |
| 1.21.0 | ^1.0.26 | ISC | |
| 1.20.0 | ^1.0.26 | ISC | |
| 1.19.0 | ^1.0.26 | ISC | |
| 1.18.0 | ^1.0.26 | ISC | |
| 1.17.0 | ^1.0.26 | ISC | |
| 1.16.0 | ^1.0.26 | ISC | |
| 1.15.0 | ^1.0.26 | ISC | |
| 1.14.0 | ^1.0.26 | ISC | |
| 1.13.0 | ^1.0.26 | ISC | |
| 1.12.0 | ^1.0.26 | ISC | |
| 1.11.0 | ^1.0.26 | ISC | |
| 1.10.0 | ^1.0.26 | ISC | |
| 1.9.1 | ^1.0.26 | ISC | |
| 1.9.0 | ^1.0.26 | ISC | |
| 1.8.0 | ^1.0.26 | ISC | |
| 1.7.0 | ^1.0.26 | ISC | |
| 1.6.0 | ^1.0.26 | ISC | |
| 1.5.0 | ^1.0.26 | ISC | |
| 1.4.0 | ^1.0.26 | ISC | |
| 1.3.0 | ^1.0.26 | ISC | |
| 1.2.0 | ^1.0.26 | ISC | |
| 1.1.0 | ^1.0.26 | ISC | |
| 1.0.0 | ^1.0.26 | ISC |