forked from kitschpatrol/shared-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e450b2
commit 16f051a
Showing
12 changed files
with
343 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env node | ||
// Placeholder, will be replaced by the actual CLI script during the build process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default ['> 0.5% in AU', 'last 3 years', 'iOS >= 7', 'ie >= 11']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Liam Rella | ||
|
||
Based on the MIT-licensed "@kitschpatrol/shared-config" project by Eric Mika | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@envsa/browserslist-config", | ||
"version": "1.0.0-beta.13", | ||
"type": "module", | ||
"description": "Browserslist configuration for @envsa/shared-config.", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:envsa/shared-config.git", | ||
"directory": "packages/browserslist-config" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/envsa/shared-config/issues", | ||
"email": "DEW.ICTWebServices@sa.gov.au" | ||
}, | ||
"author": { | ||
"name": "Liam Rella", | ||
"email": "DEW.ICTWebServices@sa.gov.au", | ||
"url": "https://github.com/rellafella" | ||
}, | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=18.0.0", | ||
"pnpm": ">=8.0.0" | ||
}, | ||
"bin": { | ||
"browserslist-config": "bin/cli.js" | ||
}, | ||
"main": "./index.js", | ||
"keywords": [ | ||
"shared-config", | ||
"browserslist-config", | ||
"browserslist", | ||
"cli" | ||
], | ||
"scripts": { | ||
"build": "../../scripts/build.ts && mdat readme", | ||
"cli": "node ./bin/cli.js", | ||
"prepublishOnly": "pnpm run build" | ||
}, | ||
"dependencies": { | ||
"@pinojs/json-colorizer": "^4.0.0", | ||
"cosmiconfig": "^9.0.0", | ||
"execa": "^8.0.1", | ||
"fs-extra": "^11.2.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<!--+ Warning: Content inside HTML comment blocks was generated by mdat and may be overwritten. +--> | ||
|
||
<!-- title --> | ||
|
||
# @envsa/browserslist-config | ||
|
||
<!-- /title --> | ||
|
||
<!-- badges --> | ||
|
||
[![NPM Package @envsa/browserslist-config](https://img.shields.io/npm/v/@envsa/browserslist-config.svg)](https://npmjs.com/package/@envsa/browserslist-config) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
|
||
<!-- /badges --> | ||
|
||
<!-- description --> | ||
|
||
**Browserslist configuration for @envsa/shared-config.** | ||
|
||
<!-- /description --> | ||
|
||
## Overview | ||
|
||
It's a shared [Browserslist](https://browsersl.ist) config. | ||
|
||
**See [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) for the recommended single-package approach.** | ||
|
||
## 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 | ||
``` | ||
|
||
## 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 {cliCommand: "browserslist-config"} --> | ||
|
||
```txt | ||
Browserslist configuration for @envsa/shared-config. | ||
Usage | ||
$ browserslist-config --init | ||
Options | ||
--init, -i Add browserslist key to `package.json`. | ||
--help, -h Print this help info. | ||
--version, -v Print the package version. | ||
``` | ||
|
||
<!-- /cli-help --> | ||
|
||
## Credits | ||
|
||
[Eric Mika](https://github.com/kitschpatrol) is the author of the original [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config) project on which this is based. | ||
|
||
<!-- license --> | ||
|
||
## License | ||
|
||
[MIT](license.txt) © Liam Rella | ||
|
||
<!-- /license --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env node | ||
import { buildCommands } from '$root/src/command-builder.ts'; | ||
|
||
await buildCommands('browserslist-config', '[Browserslist]', 'white', { | ||
init: { | ||
command: 'pnpm', | ||
defaultArguments: ['pkg', 'set', 'browserslist[0]=extends @envsa/browserslist-config'], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.