1.2.1 • Published 6 years ago

@kyso/publish v1.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

@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')
1.2.1

6 years ago

1.2.0

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago