ethcontract-rs icon indicating copy to clipboard operation
ethcontract-rs copied to clipboard

Build Docs on Docs.rs With Example Contracts

Open nlordell opened this issue 5 years ago • 4 comments

Docs.rs documentation currently does not include smart contracts. I am unsure whether or not the Docs.rs will be able to build the truffle project (might not even have node installed) so we might have to include the built truffle project in the repo :cry:

@fleupold @bh2smith any ideas?

nlordell avatar Nov 07 '19 11:11 nlordell

I don't fully understand. Why does docs.rs need to build the truffle project?

Would we be able to just include the example json file in the samples folder? I think that would be ok.

fleupold avatar Nov 07 '19 14:11 fleupold

Would we be able to just include the example json file in the samples folder?

This works for me too.

bh2smith avatar Nov 07 '19 16:11 bh2smith

So, currently we have a truffle project with sample contracts that we use for the async example and for docs (with the samples feature). These depend on the built truffle artifacts. Docs.rs builds documentation on their build machines which do not have NPM installed, so we would be unable to build this truffle project.

The solution, as you guys said, would be to include truffle compiled contracts in the repository. That just feels icky to me as in general it would be nice to avoid checking-in build artifacts.

nlordell avatar Nov 07 '19 16:11 nlordell

I believe the suggestion would be to provide the example material with out the compiled stuff and give the user a guide on how they can generate all this stuff on their own.

bh2smith avatar Nov 07 '19 16:11 bh2smith