@dmn-arc-core-components/tools_mock-ans
v1.0.0-alpha
Published
### What is this?
Downloads
636
Readme
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?
- I'd really like to add the ANS Validator, to ensure that all our ANS is in great shape.
- This currently doesn't support all ANS types, like Video or Galleries. It will, however, once those Core Components are fleshed out.
- This has not been integrated with a Fusion project for rapid development.