scaffold-eth/create-eth

document `.template.mjs` files

technophile-04 opened this issue · 1 comments

Description:

Just thinking out loud maybe we could have .md file which we can generate every time we add a new .template.mjs file.

Also in all .template.mjs maybe we could have link to example .args.mjs files. Example Header.template.mjs :

// example: https://github.com/scaffold-eth/create-eth-extensions/blob/eip-712/extension/packages/nextjs/components/Header.tsx.args.mjs

import { withDefaults } from "../../../../utils.js";
const contents = ({ menuIconImports, menuObjects }) => {
// ...
};

export default withDefaults(contents, {
  menuIconImports: "",
  menuObjects: "",
});

For example when we created #74 we could also add the link where its being used. Mostly the examples will point to some file in create-eth-extensions repo.

So whenever we create a PR like #74 we run an script which updates the templates registry .md file

Completed at #97