@ithaka/pharos-cli
TypeScript icon, indicating that this package has built-in type declarations

5.5.1 • Public • Published

Pharos CLI

A command-line tool for creating new web components for the Pharos design system.

This will generate SCSS, TypeScript, unit test, and Storybook story files for the component to make getting started more consistent.

Getting started

The dependencies for @ithaka/pharos-cli are installed when running yarn install so no additional install step is needed.

To get this CLI setup, go to your terminal and change to this directory:

$ cd packages/pharos-cli

Next, you will need to compile the TypeScript files into JavaScript:

$ yarn tsc

Lastly, you will need to link this package so it is runnable:

$ npm link

At this point the pharos command can be used in the root of this repo.

Usage

To generate the core files needed to start developing a Pharos web component, go to the root of the Pharos repository and run the following command:

$ pharos component|wc <component-name>

Example

Create a Button component by using the following command:

$ pharos wc button

You should now see your new Button component under the components directory:

├── packages
│   ├── core
│   │   ├── src
│   │   │   ├── components
│   │   │   │   ├── button
│   │   │   │   │   ├── pharos-button.ts
│   │   │   │   │   ├── pharos-button.scss
│   │   │   │   │   ├── pharos-button.test.ts
│   │   │   │   │   ├── pharos-button.wc.stories.mdx
│   │   │   │   │   └── PharosButton.react.stories.mdx

You are now ready to begin developing your new component!

$ yarn storybook:wc:dev

Happy Developing!

Readme

Keywords

none

Package Sidebar

Install

npm i @ithaka/pharos-cli

Weekly Downloads

2

Version

5.5.1

License

MIT

Unpacked Size

2.97 kB

Total Files

2

Last publish

Collaborators

  • eslawski
  • daneah
  • ironheadjay
  • michaeliden90
  • nazimali
  • jialin-he
  • ithaka-ci