Closed grizlizli closed 5 days ago
@BioPhoton Please finalize the issue for refinement
As this has quite a decent overlap with the nx generators we could do the following:
npm init @code-pushup/cli
-> npm exec @code-pushup/create-cli
create-cli
nx g @code-pushup/nx-plugin:configuration
@matejchalk WDYT?
As this has quite a decent overlap with the nx generators we could do the following:
npm init @code-pushup/cli
->npm exec @code-pushup/create-cli
- create a publishable package
create-cli
- inside use
nx g @code-pushup/nx-plugin:configuration
2.1. I have to figure out how to execute the generator without a nx.json prelsent.
Yes! Having a create-
package would give us compatibility with non-Nx codebases, since this package initializer format is supported by NPM, PNPM and Yarn 1.
Updated issue and started work.
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
:create-cli
package to enable thenpx init @code-pushup/cli
command. The init command translates tonpm exec @code-pushup/create-cli
.779
nx-plugin
logicExtend
nx-plugin
ext
to accept aext
options to specify the file extension.~ts
if given. otherwise takemjs
as extension.~Implementation details
Generate a config file in the root of the project.