@arc-core-components/tools_mock-ans
v0.4.4-beta.0
Published
### What is this?
Downloads
841
Maintainers
Keywords
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 @arc-core-components/mock-ans
And in any JS files where you want an ANS object:
import { Story } from "@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.