Merge pull request #473 from feross/npm-run-open-config
add `npm run open-config` to open config file quickly
This commit is contained in:
8
bin/open-config.js
Executable file
8
bin/open-config.js
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var config = require('../config')
|
||||||
|
var open = require('open')
|
||||||
|
var path = require('path')
|
||||||
|
|
||||||
|
var configPath = path.join(config.CONFIG_PATH, 'config.json')
|
||||||
|
open(configPath)
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"nobin-debian-installer": "^0.0.9",
|
"nobin-debian-installer": "^0.0.9",
|
||||||
|
"open": "0.0.5",
|
||||||
"plist": "^1.2.0",
|
"plist": "^1.2.0",
|
||||||
"rimraf": "^2.5.2",
|
"rimraf": "^2.5.2",
|
||||||
"run-series": "^1.1.4",
|
"run-series": "^1.1.4",
|
||||||
@@ -58,6 +59,10 @@
|
|||||||
"desktop",
|
"desktop",
|
||||||
"electron",
|
"electron",
|
||||||
"electron-app",
|
"electron-app",
|
||||||
|
"hybrid webtorrent client",
|
||||||
|
"mad science",
|
||||||
|
"torrent client",
|
||||||
|
"torrent",
|
||||||
"webtorrent"
|
"webtorrent"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -72,6 +77,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "node ./bin/clean.js",
|
"clean": "node ./bin/clean.js",
|
||||||
|
"open-config": "node ./bin/open-config.js",
|
||||||
"package": "node ./bin/package.js",
|
"package": "node ./bin/package.js",
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"test": "standard && ./bin/check-deps.js",
|
"test": "standard && ./bin/check-deps.js",
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ var TorrentSummary = require('./lib/torrent-summary')
|
|||||||
var {setDispatch} = require('./lib/dispatcher')
|
var {setDispatch} = require('./lib/dispatcher')
|
||||||
setDispatch(dispatch)
|
setDispatch(dispatch)
|
||||||
|
|
||||||
appConfig.filePath = config.CONFIG_PATH + path.sep + 'config.json'
|
appConfig.filePath = path.join(config.CONFIG_PATH, 'config.json')
|
||||||
|
|
||||||
// Electron apps have two processes: a main process (node) runs first and starts
|
// Electron apps have two processes: a main process (node) runs first and starts
|
||||||
// a renderer process (essentially a Chrome window). We're in the renderer process,
|
// a renderer process (essentially a Chrome window). We're in the renderer process,
|
||||||
|
|||||||
Reference in New Issue
Block a user