stencila-node
Stencila for Node.js
Last updated a year ago by nokome .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install stencila-node 
SYNC missed versions from official npm registry.

Stencila for Node.js

NPM Build status Build status Code coverage Dependency status Chat

Install

npm install stencila-node --global --python=python2.7

This package relies on dependencies with native add-ons (e.g. better-sqlite3, xeromq). So you will need to have node-gyp installed (https://github.com/nodejs/node-gyp#readme). The --python flag is necessary because, on OSX and Windows, node-gyp is only compatible with Python 2.7.

Register this Stencila package,

stencila-node register

This creates a host manifest file in the Stencila hosts directory (e.g. ~/.stencila/hosts/node.js on Linux). This file is used by Stencila Desktop and other packages to determine which Stencila hosts you have installed on your machine.

Use

This package lets you run JavaScript and other code from inside Stencila documents. First, you need to start serving the Stencila Host within this package. You can do that at a terminal,

stencila-node

or inside Node.js:

const stencila = require('stencila-node')
stencila.run()

This will serve a Stencila Host on localhost. You can then open your Stencila document from within the Stencila Desktop. The host will be automatically detected by the desktop app and you'll be able to execute Javascript code cells from within your documents.

You can also use this package to compile libraries of Javascript functions for use within Stencila:

stencila-node compile "~/stencila/source/libcore/"

This creates a minified Javascript bundle, in this example at "~/stencila/source/libcore/libcore.min.js

API documentation is available at https://stencila.github.io/node.

Discuss

We love feedback. Create a new issue, add to existing issues or chat with members of the community.

Contribute

See CONTRIBUTING.md.

Current Tags

  • 0.28.15                                ...           latest (a year ago)

33 Versions

  • 0.28.15                                ...           a year ago
  • 0.28.14                                ...           a year ago
  • 0.28.13                                ...           a year ago
  • 0.28.12                                ...           a year ago
  • 0.28.11                                ...           a year ago
  • 0.28.10                                ...           a year ago
  • 0.28.9                                ...           a year ago
  • 0.28.8                                ...           a year ago
  • 0.28.7                                ...           a year ago
  • 0.28.6                                ...           a year ago
  • 0.28.5                                ...           a year ago
  • 0.28.4                                ...           2 years ago
  • 0.28.3                                ...           2 years ago
  • 0.28.2                                ...           2 years ago
  • 0.29.0-develop                                ...           2 years ago
  • 0.28.1                                ...           2 years ago
  • 0.28.0-develop.1                                ...           2 years ago
  • 0.28.0                                ...           2 years ago
  • 0.27.5-document-digest                                ...           2 years ago
  • 0.27.5                                ...           2 years ago
  • 0.27.4                                ...           2 years ago
  • 0.27.3                                ...           2 years ago
  • 0.27.2                                ...           2 years ago
  • 0.27.1                                ...           2 years ago
  • 0.27.0                                ...           2 years ago
  • 0.27.0-preview.3                                ...           2 years ago
  • 0.27.0-preview.2                                ...           2 years ago
  • 0.27.0-preview.1                                ...           2 years ago
  • 0.26.2                                ...           2 years ago
  • 0.25.0                                ...           3 years ago
  • 0.25.0-preview.2                                ...           3 years ago
  • 0.25.0-preview.1                                ...           3 years ago
  • 0.25.0-preview.0                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 35
Last Day 0
Last Week 35
Last Month 2
Dependencies (24)
Dev Dependencies (11)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |