{"id":13554940,"url":"https://github.com/stencila/node","last_synced_at":"2025-10-19T06:28:58.131Z","repository":{"id":57370757,"uuid":"68079776","full_name":"stencila/node","owner":"stencila","description":"Stencila for Node.js","archived":false,"fork":false,"pushed_at":"2018-06-05T03:12:26.000Z","size":3600,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T20:37:33.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stencila.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-13T06:09:53.000Z","updated_at":"2019-01-20T09:35:29.000Z","dependencies_parsed_at":"2022-09-18T10:41:28.569Z","dependency_job_id":null,"html_url":"https://github.com/stencila/node","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Fnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Fnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Fnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stencila%2Fnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stencila","download_url":"https://codeload.github.com/stencila/node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254473762,"owners_count":22077164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:02:58.055Z","updated_at":"2025-10-19T06:28:53.115Z","avatar_url":"https://github.com/stencila.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"## Stencila for Node.js\n\n[![NPM](http://img.shields.io/npm/v/stencila-node.svg?style=flat)](https://www.npmjs.com/package/stencila-node)\n[![Build status](https://travis-ci.org/stencila/node.svg?branch=master)](https://travis-ci.org/stencila/node)\n[![Build status](https://ci.appveyor.com/api/projects/status/ipj7s8hm82809lj9/branch/master?svg=true)](https://ci.appveyor.com/project/nokome/node/)\n[![Code coverage](https://codecov.io/gh/stencila/node/branch/master/graph/badge.svg)](https://codecov.io/gh/stencila/node)\n[![Dependency status](https://david-dm.org/stencila/node.svg)](https://david-dm.org/stencila/node)\n[![Chat](https://badges.gitter.im/stencila/stencila.svg)](https://gitter.im/stencila/stencila)\n\n### Install\n\n```bash\nnpm install stencila-node --global --python=python2.7\n```\n\nThis 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.\n\nRegister this Stencila package,\n\n```\nstencila-node register\n```\n\nThis 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.\n\n### Use\n\nThis 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,\n\n```bash\nstencila-node\n```\n\nor inside Node.js:\n\n```js\nconst stencila = require('stencila-node')\nstencila.run()\n```\n\nThis will serve a Stencila `Host` on localhost. You can then open your Stencila document from within the [Stencila Desktop](https://github.com/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.\n\nYou can also use this package to compile libraries of Javascript functions for use within Stencila:\n\n```bash\nstencila-node compile \"~/stencila/source/libcore/\"\n```\n\nThis creates a minified Javascript bundle, in this example at `\"~/stencila/source/libcore/libcore.min.js`\n\nAPI documentation is available at https://stencila.github.io/node.\n\n### Discuss\n\nWe love feedback. Create a [new issue](https://github.com/stencila/node/issues/new), add to [existing issues](https://github.com/stencila/node/issues) or [chat](https://gitter.im/stencila/stencila) with members of the community.\n\n### Contribute\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstencila%2Fnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstencila%2Fnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstencila%2Fnode/lists"}