Skip to content

Commit

Permalink
docs: Improve examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Nov 12, 2020
1 parent cc079d3 commit c9cd99f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
13 changes: 11 additions & 2 deletions website/docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ distributable and consumable files for NPM, using community favorite tools like
With that being said, the `build` command can be used to build all packages in a project according
to their configured build targets (platform, formats, etc).

```json title="package.json"
{
"scripts": {
"build": "packemon build --checkLicenses --generateDeclaration",
"build:dist": "NODE_ENV=production yarn run build",
"release": "yarn run build:dist && yarn publish"
}
}
```
packemon build --checkLicenses --generateDeclaration
```

> When publishing, be sure to set `NODE_ENV` to production to remove all development and testing
> configuration settings.
## Options

Expand Down
8 changes: 6 additions & 2 deletions website/docs/clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ Building packages generate temporary files or folders that clutter a project. So
artifacts aren't properly cleaned up because a process failed midway. The `clean` command can be
used to remove all temporary files _and_ all build artifacts (lib, esm, etc folders).

```bash
packemon clean
```json title="package.json"
{
"scripts": {
"clean": "packemon clean"
}
}
```

> Cleaning a project before a release is a good practice for ensuring unknown artifacts are not
Expand Down
9 changes: 5 additions & 4 deletions website/docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ The supported environment and or version for the configured platform(s).

The supported environments above map to the following platform targets.

| | Legacy | Stable | Current | Experimental |
| ------- | --------- | --------- | ------------ | ---------------------- |
| Node | >= 8.10.0 | >= 10.3.0 | >= 12.0.0 | >= 14.13.0 |
| Browser | >= IE 10 | >= IE 11 | > 0.5% usage | last 2 chrome versions |
| | Legacy | Stable | Current | Experimental |
| ---------- | --------- | --------- | ------------ | ---------------------- |
| Node | >= 8.10.0 | >= 10.3.0 | >= 12.0.0 | >= 15.0.0 |
| Node (NPM) | >= 5.6.0 | >= 6.1.0 | >= 6.9.0 | >= 7.0.0 |
| Browser | >= IE 10 | >= IE 11 | > 0.5% usage | last 2 chrome versions |

## Formats

Expand Down
7 changes: 3 additions & 4 deletions website/docs/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ title: Installation
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Packemon was designed to be used as a global dependency, as we need full control of our
dependencies, functionality, and build processes.
Packemon can either be installed as a development or global dependency.

<Tabs
groupId="package-manager"
Expand All @@ -20,15 +19,15 @@ dependencies, functionality, and build processes.


```bash
yarn global add packemon
yarn add --dev packemon
```

</TabItem>
<TabItem value="npm">


```bash
npm install -g packemon
npm install --save-dev packemon
```

</TabItem>
Expand Down
9 changes: 4 additions & 5 deletions website/docs/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import TabItem from '@theme/TabItem';
Whether a solorepo (1 package) or a monorepo (many packages), Packemon makes the following
assumptions, some of which are hard requirements.

- Each package must contain a `package.json` (of course).
- Each package must have a source folder named `src`. Builds will output relative to this.
- Each package must have a source entry point, typically a `src/index.ts` file (or `index.js` if not
using TypeScript).
- Each package _must_ contain a `package.json` (of course).
- Each package _must_ have a source folder named `src`. Builds will output relative to this.
- Each package _must_ have a source entry point, typically a `src/index.(js|ts)` file.
- Each package may contain a `tsconfig.json`.
- Each package should contain a `LICENSE` and `README.md`.
- Each package should contain a `LICENSE(.md)?` and `README(.md)?`.

This would look something like the following.

Expand Down

0 comments on commit c9cd99f

Please sign in to comment.