@concord-consortium/codap-plugin-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

CODAP Plugin API

Using as a library

This npm library provides two main files that will aid in interfacing with the CODAP Data Interactives API. codapInterface.ts sets up some basic functions for interfacing with CODAP, while codap-helper.ts contains more specialized functions utilizing the CODAP Data Interactive API for a variety of different purposes. Find the full documentation of the CODAP Data Interactive API here.

Installing and usage

In the directory of your plugin project, run npm install codap-plugin-api.

In myComponent.js:

import codapInterface from "codap-plugin-api";
import codapHelpers from "codap-plugin-api";

const myComponent = () => {
  useEffect(() => {
    const myOptions = {
      pluginName: myPlugin;
      version: 1.0.0;
      dimensions: {
        width: 300,
        height: 400
      };
    codapHelpers.initializePlugin(myOptions);
  }, []);
}

For more examples of how to use the npm package, see the CODAP Plugin Starter Project.

Development

Building

If you want to build a local version run npm build, it will create the files in the dist folder.

Notes

  1. Make sure if you are using Visual Studio Code that you use the workspace version of TypeScript. To ensure that you are open a TypeScript file in VSC and then click on the version number next to TypeScript React in the status bar and select 'Use Workspace Version' in the popup menu.

License

CODAP Plugin API are Copyright 2018 (c) by the Concord Consortium and is distributed under the MIT license.

See license.md for the complete license text.

Package Sidebar

Install

npm i @concord-consortium/codap-plugin-api

Weekly Downloads

0

Version

0.1.8

License

MIT

Unpacked Size

109 kB

Total Files

15

Last publish

Collaborators

  • eireland
  • bgoldowsky
  • lblagg
  • emcelroy
  • tealefristoe
  • kswenson
  • concordconsortium
  • scytacki
  • dougmartin
  • piotrjanik