diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..bcbd28f --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index a5dfd93..641de07 100644 --- a/README.md +++ b/README.md @@ -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 @@ -12,7 +25,7 @@ $ npm install $ npm start ``` -Package application +Package the application ```bash $ npm run release diff --git a/package.json b/package.json index 1c35a0a..55d76ef 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/src/dashboard.html b/src/dashboard.html index be46675..b364efa 100644 --- a/src/dashboard.html +++ b/src/dashboard.html @@ -8,6 +8,7 @@ + diff --git a/src/dashboard/dashboardWindow.js b/src/dashboard/dashboardWindow.js index ef1295b..13d9c52 100644 --- a/src/dashboard/dashboardWindow.js +++ b/src/dashboard/dashboardWindow.js @@ -60,7 +60,7 @@ window.addEventListener('load', () => { }) }) - ipc.on('import:document', function() { + ipc.on('open:document', function() { dialog.showOpenDialog({ properties: ['openFile'], filters: [ diff --git a/src/document.html b/src/document.html index 03dd190..ca2589b 100644 --- a/src/document.html +++ b/src/document.html @@ -8,6 +8,7 @@ + diff --git a/src/document/documentWindow.js b/src/document/documentWindow.js index 95fa9b7..eeafc72 100644 --- a/src/document/documentWindow.js +++ b/src/document/documentWindow.js @@ -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 @@ -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 diff --git a/src/menu/dashboardFileMenu.js b/src/menu/dashboardFileMenu.js index 5d7b4e7..23ed1ce 100644 --- a/src/menu/dashboardFileMenu.js +++ b/src/menu/dashboardFileMenu.js @@ -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') } ] } diff --git a/src/shared/initBackend.js b/src/shared/initBackend.js index 4575135..df772a4 100644 --- a/src/shared/initBackend.js +++ b/src/shared/initBackend.js @@ -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)