@envsa/browserslist-config
Version:
Browserslist configuration for @envsa/shared-config.
116 lines (71 loc) • 2.93 kB
Markdown
<!--+ Warning: Content inside HTML comment blocks was generated by mdat and may be overwritten. +-->
<!-- title -->
# @envsa/browserslist-config
<!-- /title -->
<!-- badges -->
[](https://npmjs.com/package/@envsa/browserslist-config)
[](https://opensource.org/licenses/MIT)
<!-- /badges -->
<!-- description -->
**Browserslist configuration for @envsa/shared-config.**
<!-- /description -->
## Overview
It's a shared [Browserslist](https://browsersl.ist) config.
<!-- recommendation -->
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
> This package is included as a dependency in [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config), which also automatically invokes the command line functionality in this package via its `envsa` command
<!-- /recommendation -->
## Setup
To use just this browserslist config in isolation:
1. Install the `.npmrc` in your project root. This is required for correct PNPM behavior:
```sh
pnpm dlx @envsa/repo-config init
```
2. Add the package:
```sh
pnpm add -D @envsa/browserslist-config
pnpm envsa-browserslist init
```
## Usage
Integrate with your `package.json` scripts as you see fit, for example:
```json
{
"browserslist": ["extends @envsa/browserslist-config"]
}
```
or use the cli
### CLI
<!-- cli-help -->
#### Command: `envsa-browserslist`
Envsa's Browserslist shared configuration tool.
This section lists top-level commands for `envsa-browserslist`.
Usage:
```txt
envsa-browserslist <command>
```
| Command | Description |
| ------- | ---------------------------------------------------------------- |
| `init` | Initialize by copying starter config files to your project root. |
| Option | Description | Type |
| ------------------- | ------------------- | --------- |
| `--help`<br>`-h` | Show help | `boolean` |
| `--version`<br>`-v` | Show version number | `boolean` |
_See the sections below for more information on each subcommand._
#### Subcommand: `envsa-browserslist init`
Initialize by copying starter config files to your project root.
Usage:
```txt
envsa-browserslist init
```
| Option | Description | Type |
| ------------------- | ------------------- | --------- |
| `--help`<br>`-h` | Show help | `boolean` |
| `--version`<br>`-v` | Show version number | `boolean` |
<!-- /cli-help -->
<!-- license -->
## License
[MIT](license.txt) © Liam Rella
<!-- /license -->