Git Product home page Git Product logo

client-js's Introduction

@zipper-inc/client-js

portfolio

An easy way to interact with Zipper Applets from anywhere that supports ESM, CommonJS, or TypeScript.

Installation

To install into your project, use your favorite package manager to add it to your dependencies. (You don't have to do this step if you're importing from URL.)

$ yarn add @zipper-inc/client-js

# or

$ npm i @zipper-inc/client-js

And add it to your TypeScript or JavaScript files.

// ESM
import { initApplet } from '@zipper-inc/client-js';

// CommonJS
var initApplet = require('@zipper-inc/client-js').initApplet;

For Zipper, Deno, etc

Just import from URL.

import { initApplet } from 'https://deno.land/x/zipper-client-js/mod.ts';

Usage

Easily use an Applet's built-in API to interact with it as if it was a part of your project. Inputs work just like any function on Zipper.

Use the Crontab AI Generator in an admin panel.

await initApplet('crontab-ai-generator').run({ text: 'once a day' });

// 0 0 * * *

Fork an example applet like the Feature Flags Example, put it behind auth to protect your team's data, and use it your own repo.

const ff = initApplet('acme-org-feature-flags', {
  token: ACCESS_TOKEN,
});

// get a feature flag value
const liveOnProd = await ff.path('get').run({
  name: 'flag_new_drops',
  context: 'prod',
});

// flip a value programatically
await ff.path('set').run({
  name: 'flag_new_prototype',
  context: 'dev',
  value: true,
});

Anything an applet can do, your app can do.

Documentation

For more about Zipper, check out the official documentation here.

Issues

Zipper is under active development, so issues are expected! It might be helpful to use the debug mode to console log verbosely so you can see whats going on.

Just pass the debug option when initializing your applet to turn this one.

const myApp = initApplet('my-applet', { debug: true });

Let us know what your console output looks like when submitting an issue. PRs are also always welcome, see the next section.

Contributing

Zipper is under active development, so contributions are always welcome.

Since this repo is written in Deno, you must have Deno installed.

curl -fsSL https://deno.land/install.sh | sh

Check out other ways to install Deno here.

Once that's installed check out this repo locally, make some changes, and make sure it passes tests and builds by running the following command.

deno task build

License

MIT

Links

Curious about Zipper? Check us out at https://zipper.dev.

twitter

linkedin

client-js's People

Contributors

imadha avatar miguel-nascimento avatar

Stargazers

Sachin Ranchod avatar Matt Verheaghe avatar  avatar Ariel Conti avatar  avatar

Watchers

Sachin Ranchod avatar  avatar Matt Verheaghe avatar Ariel Conti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.