Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON export guide to typegen docs #7

Open
apopiak opened this issue Sep 1, 2020 · 1 comment
Open

Add JSON export guide to typegen docs #7

apopiak opened this issue Sep 1, 2020 · 1 comment

Comments

@apopiak
Copy link
Contributor

apopiak commented Sep 1, 2020

It would be great to have instructions on how to (quickly) generate polkadot-js types to json for development purposes.

e.g. something similar to the following script we created together:

const edgewareDefinitions = require('./dist/definitions.js');

console.log(edgewareDefinitions);

const types = Object
  .values(edgewareDefinitions)
  .reduce((res, { types }) => ({ ...res, ...types }), {});

console.log(JSON.stringify(types));

and add it here (or similar).

@jacogr jacogr transferred this issue from polkadot-js/api Oct 6, 2020
@jacogr jacogr added the @api label Oct 6, 2020
@jacogr
Copy link
Member

jacogr commented Oct 7, 2020

Updated doc link for the "here" above - https://polkadot.js.org/docs/api/examples/promise/typegen/#packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants