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

Commit

Permalink
Merge pull request #10 from stencila/feature-stencila-upgrade
Browse files Browse the repository at this point in the history
Integrates various changes to stencila/stencila, stencila/node and some some changes here too.
  • Loading branch information
Nokome Bentley authored May 1, 2017
2 parents 5c18c4b + 5baca9f commit f90291b
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 13 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dist: trusty
language: node_js
node_js:
- 7
os:
- osx
- linux
addons:
apt:
packages:
- xvfb
env:
- DISPLAY=":99.0"
install:
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- npm install
after_success:
- npm run release
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
# Stencila Desktop
## Stencila Desktop

[![Build status](https://travis-ci.org/stencila/desktop.svg?branch=master)](https://travis-ci.org/stencila/desktop)
[![Dependency status](https://david-dm.org/stencila/desktop.svg)](https://david-dm.org/stencila/desktop)
[![Chat](https://badges.gitter.im/stencila/stencila.svg)](https://gitter.im/stencila/stencila)

Install
### Install

Download the [latest release](https://github.com/stencila/desktop/releases) for your operating system.

### Use

See the guide documents installed with the application.

### Discuss

We :heart: feedback. Create a [new issue](https://github.com/stencila/desktop/issues/new), add to [existing issues](https://github.com/stencila/desktop/issues) or [chat](https://gitter.im/stencila/stencila) with members of the community.

### Develop

```bash
$ git clone https://github.com/stencila/desktop.git
Expand All @@ -12,7 +25,7 @@ $ npm install
$ npm start
```

Package application
Package the application

```bash
$ npm run release
Expand Down
18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
"name": "stencila-desktop",
"productName": "Stencila Desktop",
"description": "Stencila for the desktop",
"version": "0.25.1",
"version": "0.26.0",
"author": "Nokome Bentley",
"homepage": "http://stenci.la",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/stencila/desktop.git"
},
"bugs": {
"url": "https://github.com/stencila/desktop/issues"
},
"license": "Apache-2.0",
"main": "app/main.js",
"build": {
"appId": "com.stencila.stencila-desktop",
Expand All @@ -19,18 +26,19 @@
"scripts": {
"postinstall": "install-app-deps",
"lint": "eslint *.js src",
"release": "build",
"release": "node make && build",
"watch": "node make -w",
"build": "node make",
"app": "electron .",
"start": "node make && npm-run-all --parallel watch app"
},
"dependencies": {
"stencila": "^0.25.7",
"stencila-node": "^0.25.0"
"stencila": "^0.26.3",
"stencila-node": "^0.26.2"
},
"devDependencies": {
"npm-run-all": "^3.1.0",
"extract-zip": "=1.6.0",
"electron": "1.6.2",
"electron-builder": "^14.5.2",
"source-map-support": "^0.4.11",
Expand Down
1 change: 1 addition & 0 deletions src/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script type="text/javascript" src="./lib/stencila/lib/substance-mini.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/brace.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/d3.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/unified-bundle.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/vega.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/vega-lite.js"></script>
<script type="text/javascript" src="./lib/stencila/katex/katex.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/dashboardWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ window.addEventListener('load', () => {
})
})

ipc.on('import:document', function() {
ipc.on('open:document', function() {
dialog.showOpenDialog({
properties: ['openFile'],
filters: [
Expand Down
1 change: 1 addition & 0 deletions src/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script type="text/javascript" src="./lib/stencila/lib/substance-mini.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/brace.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/d3.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/unified-bundle.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/vega.min.js"></script>
<script type="text/javascript" src="./lib/stencila/lib/vega-lite.js"></script>
<script type="text/javascript" src="./lib/stencila/katex/katex.min.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion src/document/documentWindow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { DocumentPage, getQueryStringParam } = window.stencila
const { DocumentPage, Host, getQueryStringParam } = window.stencila
const initBackend = require('../shared/initBackend')
const remote = require('electron').remote
const { Menu } = remote
Expand Down Expand Up @@ -84,10 +84,12 @@ _updateMenu(appState)

window.addEventListener('load', () => {
initBackend().then((backend) => {
let host = new Host()
window.backend = backend
let documentId = getQueryStringParam('documentId')
window.documentId = documentId
window.documentPage = DocumentPage.mount({
host,
backend,
appState,
documentId
Expand Down
5 changes: 3 additions & 2 deletions src/menu/dashboardFileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ module.exports = function dashboardFileMenu() {
click: createMenuClickHandler('new:document')
},
{
label: 'Import',
click: createMenuClickHandler('import:document')
label: 'Open',
accelerator: 'CommandOrControl+O',
click: createMenuClickHandler('open:document')
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/initBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const fs = require('fs')
const { app } = remote

const DOCUMENTS_DIR = app.getPath('documents')
const STENCILA_LIBRARY_DIR = path.join(DOCUMENTS_DIR, 'Stencila-0.25.1')
const STENCILA_LIBRARY_DIR = path.join(DOCUMENTS_DIR, 'Stencila-0.26.0')
const STENCILA_LIBRARY_FILE = path.join(STENCILA_LIBRARY_DIR, 'library.json')
const fileSystemBackend = new FileSystemBackend(STENCILA_LIBRARY_DIR)

Expand Down

0 comments on commit f90291b

Please sign in to comment.