cli icon indicating copy to clipboard operation
cli copied to clipboard

Npx command to setup default config

Open grizlizli opened this issue 7 months ago • 4 comments

User story

As a developer, I would like to setup the CLI as easy as possible.

Running the command such as npx code-pushup init should create code-pushup.config.[ ts | js | mjs ] file. init command should have arguments for file extension, default ts.

Acceptance criteria

Running the above mentioned command should generate the config file in the project.

Add package create-cli:

  • [x] create create-cli package to enable the npx init @code-pushup/cli command. The init command translates to npm exec @code-pushup/create-cli.
    #779
  • [x] create init script that is able to reuse the nx-plugin logic

Extend nx-plugin

  • [ ] extend the ext to accept a ext options to specify the file extension.
  • [ ] auto detect typescript and take ts if given. otherwise take mjs as extension.

Implementation details

Generate a config file in the root of the project.

grizlizli avatar Jul 10 '24 14:07 grizlizli