@manta-style/cli
A command line tool for Manta Style
Last updated 7 months ago by cryrivers .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @manta-style/cli 
SYNC missed versions from official npm registry.

Manta Style CircleCI Codecov GitHub Greenkeeper badge

???? Futuristic API Mock Server for Frontend

Motivation

Manta Style generates "real" (enough) mock data from your type definitions.

With Manta Style, you can start implementing feature once your data schema is defined. But Manta Style is more than just that.

Generates mock data directly from your type declarations

Manta Style officially supports TypeScript and Flow at the moment.

Mock data with respect to real world scenario such as past dates, addresses, names

interface User {
  /**
   * @faker {{internet.userName}}
   *
   */
  userName: string; // Amina.Langosh49

  /**
   * @faker date.past
   */
  birthday: number; // 1529370938452

  /**
   * @example Croatia
   */
  country: string; // Croatia
}

Mock conditions specific to your type definitions

type WithResponseSuccess<T> = {
  status: 'ok';
  data: T;
};

type WithResponseFailure = {
  status: 'error';
  /**
   * @example Bad Request
   */
  message: string;
};

type WithResponse<T> = WithResponseSuccess<T> | WithResponseFailure;

Manta Style will generate either the error case or the normal case according to your declarations. Already have your list of error conditions and messages well-defined with your back end? You are in the luck! Manta Style will generate those cases for you just like in real world.

This also gives us one more motivation to fine-tune the typing to our codebase.

Fix a test case like a snapshot.

Implementing boundary cases has been hair pulling. With Manta Style you can supply a snapshot and have it returned every time until you finish.

... and more

Need more feature? Create an issue and let us know how Manta Style can help you.

Documentation

Check out the Quick Start page for a quick overview.

The documentation is divided into the following sections:

Contributing

Getting Started

npm install
npm run bootstrap
npm run build

Acknowledgments

  • Zhongliang Wang for original idea, architecture design, initial implementation of runtime and transformers.
  • Tan Li Hau for the design and implementation of selective mocking, plugin system, FlowType support and many official plugins.
  • Jennie Ji for implementation of live-reload feature.
  • Wei Gao for brilliant documentation.

License

Manta Style is MIT licensed

Current Tags

  • 0.2.0-alpha.24                                ...           latest (7 months ago)

50 Versions

  • 0.2.0-alpha.24                                ...           7 months ago
  • 0.2.0-alpha.23                                ...           7 months ago
  • 0.2.0-alpha.22                                ...           7 months ago
  • 0.2.0-alpha.21                                ...           7 months ago
  • 0.2.0-alpha.20                                ...           7 months ago
  • 0.2.0-alpha.19                                ...           7 months ago
  • 0.2.0-alpha.18                                ...           8 months ago
  • 0.2.0-alpha.17                                ...           8 months ago
  • 0.2.0-alpha.16                                ...           8 months ago
  • 0.2.0-alpha.14                                ...           8 months ago
  • 0.2.0-alpha.13                                ...           8 months ago
  • 0.2.0-alpha.12                                ...           8 months ago
  • 0.2.0-alpha.11                                ...           9 months ago
  • 0.2.0-alpha.10                                ...           9 months ago
  • 0.2.0-alpha.9                                ...           9 months ago
  • 0.2.0-alpha.8                                ...           10 months ago
  • 0.2.0-alpha.7                                ...           a year ago
  • 0.2.0-alpha.6                                ...           a year ago
  • 0.2.0-alpha.5                                ...           a year ago
  • 0.2.0-alpha.4                                ...           a year ago
  • 0.2.0-alpha.2                                ...           a year ago
  • 0.2.0-alpha.1                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.1.0-alpha.abecd46                                ...           a year ago
  • 0.1.0-alpha.0c618e4                                ...           a year ago
  • 0.1.0-alpha.f580c3f                                ...           a year ago
  • 0.1.0-alpha.8509b35                                ...           a year ago
  • 0.1.0-alpha.c8466ed                                ...           a year ago
  • 0.1.0-alpha.59e347e                                ...           a year ago
  • 0.1.0-alpha.484a7cb                                ...           a year ago
  • 0.1.0-alpha.9afd7bf                                ...           a year ago
  • 0.1.0-alpha.78a0bb5                                ...           a year ago
  • 0.1.0-alpha.13a1961                                ...           a year ago
  • 0.1.0-alpha.8f8d856                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.13                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.11                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 51
Last Day 0
Last Week 0
Last Month 0
Dependencies (22)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |