Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
/ chameleon-sdk Public archive

Chameleon Software Development Kit

License

Notifications You must be signed in to change notification settings

nsftx/chameleon-sdk

Repository files navigation

CircleCI Build Status codebeat badge codecov npm Greenkeeper badge

chameleon-sdk

Chameleon Software Development Kit is a package for rapid development of Chameleon bundles. It also serves as an integral part of Chameleon Builder. This package is already used if you use chameleon-bundle Vue CLI plugin for scaffolding bundle projects.

Note: Compatible with Node v10.x and newer.

Installing

The preferred way to install the Chameleon SDK for is to use the npm package manager. Simply type the following into a terminal window:

npm install @nsoft/chameleon-sdk

Modules

API

This module contains implemented data connectors. These connectors are used by sourceable mixin to load local and remote data. Currently we support only internal connectors to Chameleon and Ride infrastructure. Also, we have local connector that loads dummy data which can be used in local development of bundle.

Mixins

Apply mixins to get out of the box functionality for bundle and interaction with Chameleon Builder. Basic mixin is elementable and each element in bundle should apply it. Some other mixins depend on elementable mixin.

  • elementable: Basic mixin for all elements used in Builder
  • bindable: Adds support for dynamic value binding of options
  • dependable: Lazy loads external dependencies like Quill, GoogleMaps API, etc.
  • reactionable: Adds support for Chameleon reaction system
  • sourceable: Add helper methods for loading local and remote data sources

Utility

Module for common utility functions that are used internally or can be used in third-party bundle:

  • localStorage: Writing and reading data from localStorage

Implementing RESTful connector

To create compatible RESTful API that can be used in Chameleon system, API must create four methods that conform to methods currently used in our SDK:

  • getSources
  • getSourceSchema
  • getSourceData
  • changeSourceData

Please consult Generic API connector documentation for details.