This readme is automatically generated by create-ink-app
$ npm install --global analytics-tools
$ analytics-tools --help
Usage
$ analytics-tools
Options
--name Your name
Examples
$ analytics-tools --name=Jane
Hello, Jane
Here's a brief overview of each file:
-
source/app.tsx
: This file defines a React component namedApp
, which takes a single propname
and renders "Hello, " followed by the name in green. Ifname
is not provided, it defaults to "Stranger". -
source/cli.tsx
: This file is the entry point for your command-line application. It uses themeow
library to parse command-line arguments and define flags. In this case, you have aname
flag of typestring
. Therender()
function from Ink is used to render theApp
component with thename
prop set to the value of thename
flag provided by the user. -
package.json
: This file contains the metadata of your project, such as the name, version, dependencies, devDependencies, and various scripts for building and testing the application.
In order to run your application, you need to follow these steps:
-
Install the dependencies by running
npm install
oryarn
in your project's root directory. -
Build the TypeScript files by running
npm run build
oryarn build
. This will compile your TypeScript files into thedist
directory. -
Run your CLI by running
node dist/cli.js
followed by any options you want to pass, for example:node dist/cli.js --name=John
. -
To make the CLI executable globally, you can either symlink the
dist/cli.js
file to a directory in yourPATH
or publish your package to npm and install it globally.