@dmn-arc-core-components/tools_mock-ans

1.0.0-alpha • Public • Published

Mock ANS for Core Components

What is this?

Mock ANS is an npm package that you can use to quickly mock ANS objects for rapid development with Core Components.

It is designed to match up with the ANS Schema.

All of the content is generated using various npm packages, so nothing is secret, and some of it is kind of fun!

It is particularly useful for mocking up the docz portions of Core Components.

How do I use it?

Within your project repo:

npm install @dmn-arc-core-components/mock-ans

And in any JS files where you want an ANS object:

import { Story } from "@dmn-arc-core-components/mock-ans";

const myCoolANS = new Story();

What if I want to pass in some specific stuff, like websites, etc?

Currently, you can pass in an object with a key of website to specify what websites this ANS should be part of, like this:

const myCoolANSStoryWithASpecificWebsite = new Story({
  website: "my-ans-website"
});

More support might be added for this functionality, as we go along.

What else would you do with this package, if you had time?

  1. I'd really like to add the ANS Validator, to ensure that all our ANS is in great shape.
  2. This currently doesn't support all ANS types, like Video or Galleries. It will, however, once those Core Components are fleshed out.
  3. This has not been integrated with a Fusion project for rapid development.

Dependents (0)

Package Sidebar

Install

npm i @dmn-arc-core-components/tools_mock-ans

Weekly Downloads

165

Version

1.0.0-alpha

License

ISC

Unpacked Size

139 kB

Total Files

82

Last publish

Collaborators

  • mddilley
  • jfoxworth