Skip to content

Commit

Permalink
replace npm run dev with "lite"
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmix committed May 16, 2019
1 parent b52476e commit eb1bf41
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 8 additions & 0 deletions lite.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// this is for `npm run lite`

const Config = require('ssb-config/inject')
const Start = require('./ui.js')

const config = Config(process.env.ssb_appname || 'ssb')

Start(config)
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"postinstall": "npm run rebuild",
"rebuild": "electron-builder install-app-deps",
"start": "electron index.js -- --title patchbay",
"dev": "echo 'run your own sbot!' && electro ui.js -- --title patchbay --icon ./assets/icon.png",
"start-frameless": "FRAME=false npm start",
"lite": "echo 'run your own sbot!' && electro lite.js -- --title patchbay --icon ./node_module/ssb-ahoy/electron/assets/icon.png",
"dist": "electron-builder",
"test": "standard",
"lint": "standard --fix"
Expand Down Expand Up @@ -138,11 +138,19 @@
"category": "Network",
"target": "AppImage"
},
"appImage": {
"artifactName": "${name}-Linux-${version}-${arch}.${ext}"
},
"dmg": {
"artifactName": "${name}-Mac-${version}.${ext}",
"icon": "build/dmg-icon.icns"
},
"win": {
"publisherName": "Secure Scuttlebutt Consortium"
},
"nsis": {
"artifactName": "${name}-Windows-${version}.${ext}",
"installerIcon": "build/setup-icon.ico"
}
}
}
4 changes: 3 additions & 1 deletion ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const values = require('lodash/values')

const { patchcore, patchbay, plugins, configModule } = require('./exports')

function Start (config = {}) {
function Start (config) {
if (!config) throw new Error('patchbay/ui.js needs to be provided with a valid server config')

// polyfills
require('setimmediate')

Expand Down

0 comments on commit eb1bf41

Please sign in to comment.