Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: TUP-700 @tacc/core-components - readme #467

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 63 additions & 15 deletions libs/core-components/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# TACC: Core-Components
# TACC Core-Components

This library was generated with [Nx](https://nx.dev).

Reusable components for TACC WMA Workspace Portals & Websites
The shared components for TACC WMA Workspace Portals & Websites

## Table of Contents

Expand Down Expand Up @@ -30,10 +28,37 @@ Reusable components for TACC WMA Workspace Portals & Websites

## Getting Started

> **Important**
> To develop a new or existing custom CMS website for a TACC client, do **not** clone this repository. Instead, read [Develop a Custom Project]. To develop on the Core CMS (upon which our other CMS are built) continute reading.
1. Install with any package manager e.g.

- `npm install @tacc/core-styles`
- `yarn add @tacc/core-styles`

2. Import component(s) e.g.

```ts
import { Button } from '@tacc/core-components';
```

```ts
import {
FormikInput,
FormikTextarea,
FormikCheck
} from '@tacc/core-components';
```

3. Use component(s)…

Set up a new local CMS instance.
> **Sorry.** Examples are limited and incomplete:
> - [TACC-Cloud/hazmapper#239](https://github.com/TACC-Cloud/hazmapper/pull/239/files)
> - [TACC/tup-ui#465](https://github.com/TACC/tup-ui/pull/465/files)
> - [TACC/tup-ui@ee5e73b:`/.../Button.stories.tsx`](https://github.com/TACC/tup-ui/blob/ee5e73b/libs/core-components/src/lib/Button/Button.stories.tsx#L26-L37)

## Developing

The components are [React components](https://react.dev/learn) that should be [written in TypeScript](https://react.dev/learn/typescript#typescript-with-react-components).

### Setup

0. [Clone this Repository.](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
1. Enter the Repository Clone:
Expand All @@ -54,18 +79,30 @@ Set up a new local CMS instance.
npx nx serve core-components
```

## Developing
For more commands, see [Commands](#commands).

The components are [React components](https://react.dev/learn) that should be [written in TypeScript](https://react.dev/learn/typescript#typescript-with-react-components).
## Contributing

| command | task | service |
| ------------------------------ | ------------------ | ----------------------------- |
| `npx nx test core-components` | execute unit tests | [Vitest](https://vitest.dev/) |
| `npx nx build core-components` | build components | [Vite](https://vitejs.dev/) |
### to Components

## Contributing
#### Minimum Viable Product

0. Create or Improve a common component in a TACC repository e.g.

- https://github.com/TACC/tup-ui
- https://github.com/TACC/Core-Portal
- https://github.com/TACC-Cloud/hazmapper

1. Put your work in a branch in this repository.
2. Open a [Pull Request](https://github.com/TACC/tup-ui/pulls).
3. [Test your work in a client repository.](#end-to-end-tests)

### to the Demo
#### Complete Contribution

4. [Create a story](https://storybook.js.org/docs/writing-stories) to demo the component.
5. Create [unit tests](#unit-tests).

### in the Demo

| task | reference |
| ------------------ | ------------------------------------------------- |
Expand All @@ -82,6 +119,17 @@ Run `nx test core-components` to execute the unit tests via [Vitest](https://vit

Perform manually by installing and testing the components in a separate respository. See [different approaches to testing your own packages](https://dev.to/one-beyond/different-approaches-to-testing-your-own-packages-1kdg).

## Resources

### Commands

| command | task | service |
| ---------------------------------------- | ------------------ | -------------------------------------- |
| `npx nx serve core-components` | start demo | [Storybook](https://storybook.js.org/) |
| `npx nx build core-components` | build components | [Vite](https://vitejs.dev/) |
| `npx nx build-storybook core-components` | build demo | [Storybook](https://storybook.js.org/) |
| `npx nx test core-components` | execute unit tests | [Vitest](https://vitest.dev/) |

<!-- Link Aliases -->

[core styles]: https://github.com/TACC/Core-Styles
Expand Down
2 changes: 1 addition & 1 deletion libs/core-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tacc/core-components",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",
"author": "TACC ACI WMA <wma-portals@gmail.com>",
"description": "React component library for TACC applications.",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading