@kyso/publish

1.2.1 • Public • Published

@kyso/publish

Installation

npm install @kyso/publish

or

yarn add @kyso/publish

Usage

Publish

const { publish } = require('@kyso/publish')

publish({
  name, // the name of the study to be published
  main, // the main file to be rendered on kyso
  user, // kyso user object with at least nickname (str) sessionToken (str), and objectId (str)
  files, // optional (for use in browser) is an array of files
  onProgress, // option function to check progress
  directory, // optional (for use with nodejs) is a local folder to read the files from
  apiUrl // url of kyso api, defaults to https://api.kyso.io
})

files (for use in browser) is an array of files in the form:

{
  data: Buffer,
  path: String,
}

Buffer

This is useful for preparing files in a browser, turns a string into a buffer

const { Buffer } = require('@kyso/publish')

const buf = Buffer.from('somestring')

Readme

Keywords

none

Package Sidebar

Install

npm i @kyso/publish

Weekly Downloads

1

Version

1.2.1

License

ISC

Unpacked Size

244 kB

Total Files

19

Last publish

Collaborators

  • frankyso
  • eoinmurray
  • helenadomo