AlexGaiser / fast-react

A CLI tool to quickly spin up a lightweight and fully customizable react project
MIT License
0 stars 0 forks source link

Feat/issue#10 cli arguments #18

Closed Scott-Ian closed 3 years ago

Scott-Ian commented 3 years ago

Here is the Yargs implementation/example.

I spread out the implementation into three files which we will probably want to adjust later:

-cli_functions.ts : contains the functions which are to be executed if a flag is present. parameters may be passed through if the flag requires more information

I tested this to make sure it's working as intended. The only issue is that I am receiving a TypeError warning with cli_options.ts (line 37: cliExecutableskey;) but it all works as intended.

While installing yargs as a dependency, this also adds a @types/node dependency, as the jest tests were failing on my system.

Scott-Ian commented 3 years ago

Well I neglected to get the styling up to snuff for the linter. I can't get the linter to run on my machine either. Can you remind me of the command? I keep getting a missing script: lint error on my machine when attempting to run.

I'll have to troubleshoot it at a later date though.

AlexGaiser commented 3 years ago

Well I neglected to get the styling up to snuff for the linter. I can't get the linter to run on my machine either. Can you remind me of the command? I keep getting a missing script: lint error on my machine when attempting to run.

I'll have to troubleshoot it at a later date though.

The command to lint your project is npm run ci:lint. But VSCode should also be set up to provide live linting for you. You also need to make sure that you have prettier installed as well. If you don't have eslint or prettier on your command line you can add them with

npm install -g eslint
npm install -g prettier
brian-ogilvie commented 3 years ago

In addition to adding eslint and prettier to your machine, you'll also need to add them as extensions to VS code: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode