https://github.com/circuit/umd
CommonJS, AMD and Browser (global) usage of circuit-sdk
https://github.com/circuit/umd
Last synced: 12 months ago
JSON representation
CommonJS, AMD and Browser (global) usage of circuit-sdk
- Host: GitHub
- URL: https://github.com/circuit/umd
- Owner: circuit
- Created: 2018-02-01T03:14:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T01:10:40.000Z (almost 2 years ago)
- Last Synced: 2025-04-04T10:11:29.786Z (about 1 year ago)
- Language: JavaScript
- Size: 416 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CommonJS, AMD and Browser (global) usage of circuit-sdk
> circuit.js is included in this repo just until the umd-capable version is officially published to npm and unpkg
As the repo indicates, the circuit-sdk is now available as UMD module, meaning it can be used as CommonJS or AMD module, and also still as browser global `Circuit` object.
In addition the JS SDK and Node.js SDK now come in a single, common module, the`circuit.js` file.
This repo contains example apps using the Circuit JS SDK:
* a CommonJS node app
* an AMD browser app
* a browser app with regular global script include of the SDK
## Install
```bash
npm i -g http-server
npm i -g concurrently
git clone https://github.com/circuit/umd.git
cd umd
npm run commonjs // to run CommonJS node app
npm run amd // to run AMD browser app
npm run global // to run Browser global app
```
> The `client_id`'s in the examples are for the circuitsandbox and require the browser apps to run on http://localhost:7000 as defined in `package.json`