graph-tooling icon indicating copy to clipboard operation
graph-tooling copied to clipboard

Call commands internally instead of as `npm/yarn` script

Open dimitrovmaksim opened this issue 2 years ago • 1 comments
trafficstars

Which packages are impacted by your issue?

@graphprotocol/graph-cli

Describe the issue

On init or add the codegen command for example is executed as a yarn/npm script

There are already places where commands are invoked internally, for example the add command when adding more contracts on init https://github.com/graphprotocol/graph-tooling/blob/main/packages/cli/src/commands/init.ts#L1073

That may also make the install dependencies step obsolete during the init process and be left for the users to do manually with their preferred package manager

Expected behavior

The cli should call the commands internally instead of using the generated npm/yarn script from the package.json to execute codegen

dimitrovmaksim avatar Apr 10 '23 05:04 dimitrovmaksim

I think this is also important given we are going to be publishing this as binary soon #1257

saihaj avatar Apr 11 '23 19:04 saihaj