# wgo-root

> Configurations already part of the package are:

Latest version **0.0.1** (published 2022-12-30) · 0 weekly downloads

## Install

```sh
npm install wgo-root
pnpm add wgo-root
yarn add wgo-root
bun add wgo-root
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-12-30 |
| First published | 2022-12-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | fmir |

## Links

- npm: https://www.npmjs.com/package/wgo-root
- Repository: https://github.com/farooqmir/wingo-apps
- npm.io page: https://npm.io/package/wgo-root

## Dependencies (1)

- [@tailwindcss/typography](https://npm.io/package/@tailwindcss/typography.md) ^0.5.8

## Recent versions

- 0.0.1 (latest) — 2022-12-30

## README

# Wingo monorepo (turborepo) for all products and the core library (DLS)

Configurations already part of the package are:

1. Core library for react components - shared with other projects, used to create your application using reusable components from core library.
2. Core shared 'utils', for all your utilities.
3. Shared configrations for typescipt, postcss, next, tailwindcss
4. React next app, project application that uses core shared packages like, core component library, configrations, utils etc.

Tools preconfigured:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
- [Changesets](https://github.com/changesets/changesets) for managing versioning and changelogs
- [GitHub Actions](https://github.com/changesets/action) for fully automated package publishing

## Using this example

Clone the setup locally or [from GitHub](https://github.com/farooqmir/turboreposetup):

```bash
npx degit https://github.com/farooqmir/wingo-apps
cd wingo-apps
yarn install
git init . && git add . && git commit -m "Init"
```

### Useful Commands

- `yarn build` - Build all packages including the Storybook site
- `yarn dev` - Run all packages locally and preview with Storybook
- `yarn lint` - Lint all packages
- `yarn changeset` - Generate a changeset
- `yarn clean` - Clean up all `node_modules` and `dist` folders (runs each package's clean script)

## Apps & Packages

This Turborepo includes the following packages and applications:

- `apps/docs`: Documentation core components in storybook
- `packages/reactwiind`: Core shared React components
- `packages/rw-utils`: Shared utilities
- `packages/rw-tsconfig`: Shared `tsconfig.json`s used throughout the monorepo
- `packages/eslint-config-rw`: ESLint preset

To install a dependency for the entire monorepo, use the `-W` workspaces flag with `yarn add`.

### Compilation

To make the core library code work across all browsers, we need to compile the raw TypeScript and React code to plain JavaScript. We can accomplish this with `tsup`, which uses `esbuild` to greatly improve performance.

For `reactwiind`, the `build` command is the following:

```bash
tsup src/index.tsx --format esm,cjs --dts --external react
```

`tsup` compiles `src/index.tsx`, which exports all of the components in the design system, into both ES Modules and CommonJS formats as well as their TypeScript types. The `package.json` for `wingo-core` then instructs the consumer to select the correct format:

```json:reactwiind/package.json
{
  "name": "reactwiind",
  "version": "0.0.0",
  "main": "./dist/index.js",
  "module": "./dist/index.mjs",
  "types": "./dist/index.d.ts",
  "sideEffects": false,
}
```

Run `yarn build` to confirm compilation is working correctly. You should see a folder `reactwiind/dist` which contains the compiled output.

```bash
wingo-core
└── dist
    ├── index.d.ts  <-- Types
    ├── index.js    <-- CommonJS version
    └── index.mjs   <-- ES Modules version
```

### Generating the Changelog

To generate your changelog, run `yarn changeset` locally:

1. **Which packages would you like to include?** – This shows which packages and changed and which have remained the same. By default, no packages are included. Press `space` to select the packages you want to include in the `changeset`.
1. **Which packages should have a major bump?** – Press `space` to select the packages you want to bump versions for.
1. If doing the first major version, confirm you want to release.
1. Write a summary for the changes.
1. Confirm the changeset looks as expected.
1. A new Markdown file will be created in the `changeset` folder with the summary and a list of the packages included.

### Releasing

When you push your code to GitHub, the [GitHub Action](https://github.com/changesets/action) will run the `release` script defined in the root `package.json`:

```bash
turbo run build --filter=docs^... && changeset publish
```

Turborepo runs the `build` script for all publishable packages (excluding docs) and publishes the packages to npm. By default, this example includes `wingo` as the npm organization. To change this, do the following:

- Rename folders in `packages/*` to replace `wingo` with your desired scope
- Search and replace `wingo` with your desired scope
- Re-run `yarn install`

To publish packages to a private npm organization scope, **remove** the following from each of the `package.json`'s

```diff
- "publishConfig": {
-  "access": "public"
- },
```

---
_Source: https://npm.io/package/wgo-root · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
