@ztimson/pumpkinpie
Node module for full Datalynk compatability
Last updated 7 months ago by ztimson .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @ztimson/pumpkinpie 
SYNC missed versions from official npm registry.

PumpkinPie

A front end framework to work with Datalynk

pipeline status

This is a library to provide full Datalynk support to any JS framework or app, it supports both promises and RxJS.

Table of Contents

Quick Start

  1. Install Pumpkin Pie
npm install --save @ztimson/pumpkinpie

yarn add @ztimson/pumpkinpie
  1. Add generator script to package.json
{
  "name": "example",
  "scripts": {
    "generate": "generate <spoke> [login] [password]", // <---- Login/Password optional
  },
  ...
  1. Generate the models. If you didn't hard code the login/password you will be prompted. The generated files will be created under the 'models' folder in the current working directory. Feel free to move them.
npm run generate
> Login: example
> Password: ********

yarn generate
> Login: example
> Password: ********
  1. Create an API object
import {API} from '@ztimson/pumpkinpie'

const api = new API('http://example.auxiliumgroup.com/api');
  1. Import the generated models and start using them with the slice object
import {User} from './models/User.model';
import {Slices} from './models/slices';

// Passing the User model into the slice as a generic provide