Skip to content
This repository was archived by the owner on Sep 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #17 from stencila/patch-1
Browse files Browse the repository at this point in the history
Patch 1
  • Loading branch information
oliver7654 authored Jul 7, 2017
2 parents d73df08 + 0a0e725 commit 00bad0e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion make.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var b = require('substance-bundler')
function _copyAssets() {
b.copy('./src', './bundle')
b.copy('./package.json', './bundle/package.json')
b.copy('./node_modules/stencila/build', './bundle/lib/stencila')
b.copy('./node_modules/stencila-node/static/stencila', './bundle/lib/stencila')
}

b.task('clean', () => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"start": "node make && npm-run-all --parallel watch app"
},
"dependencies": {
"stencila": "0.27.4",
"stencila-node": "0.27.0"
"mkdirp": "^0.5.1",
"stencila-node": "0.27.3"
},
"devDependencies": {
"npm-run-all": "^3.1.0",
Expand Down
4 changes: 3 additions & 1 deletion src/document/documentWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ window.addEventListener('load', () => {
// e.g. Stencila R host started 'manually' locally
// e.g. Stencila Python host started in a docker container
let host = new Host({
// Attempt to discover hosts every x seconds
// No initial peers
peers: null,
// Attempt to discover local peers every x seconds
discover: 30
})
window.host = host
Expand Down
3 changes: 2 additions & 1 deletion src/shared/initBackend.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* window process */
const path = require('path')
const fs = require('fs')
const mkdirp = require('mkdirp')

const { FileSystemBackend, host } = require('stencila-node')
const { version } = require('../package.json')
Expand All @@ -20,7 +21,7 @@ function initBackend() {

// Create the needed folders
if (!fs.existsSync(STENCILA_LIBRARY_DIR)) {
fs.mkdirSync(STENCILA_LIBRARY_DIR)
mkdirp(STENCILA_LIBRARY_DIR)
}
// Create empty library file
fs.writeFileSync(path.join(STENCILA_LIBRARY_DIR, 'library.json'), '{}', 'utf8')
Expand Down

0 comments on commit 00bad0e

Please sign in to comment.