Add postinstall scripts

This commit is contained in:
r1oga
2022-12-14 14:55:07 +01:00
parent 3c8c44e14a
commit b94e60353e
8 changed files with 36 additions and 18 deletions

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
# Shared Configurations
- [eslint](./packages/eslint)
- [prettier](./packages/prettier)
## Publish
`pnpx lerna publish`

View File

@@ -1,11 +1,8 @@
{
"name": "dotfiles",
"name": "@r1oga/config",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"author": "r1oga",
"license": "MIT",
"devDependencies": {
"lerna": "^6.1.0"
}

View File

@@ -1,11 +1,11 @@
node_modules
pnpm-lock.yaml
package-lock.json
pnpm-lock.yaml
yarn.lock
# build dirs
dist
build
dist
# Jest
coverage

View File

@@ -0,0 +1,3 @@
# @r1oga/prettier
## Installation
`pnpm add -D @r1oga/eslint-config`

View File

@@ -0,0 +1,6 @@
#!/bin/bash
lib=@r1oga/eslint-config
pnpm add -D $lib
echo "extends: $lib" > .eslintrc.yaml
cp node_modules/$lib/.eslintignore .eslintignore

View File

@@ -1,11 +1,12 @@
{
"name": "@r1oga/eslint",
"name": "@r1oga/config-eslint",
"version": "1.0.0",
"description": "Share ES Lint configuration",
"description": "Shared eslint configuration",
"main": ".eslintrc.yaml",
"scripts": {
"publish": ""
},
"files": [
".eslintrc.yaml",
".eslintignore"
],
"keywords": [
"eslint",
"config",
@@ -18,6 +19,9 @@
"publishConfig": {
"access": "public"
},
"scripts": {
"postinstall": "sh install.sh"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",

View File

@@ -1,5 +1,7 @@
#!/bin/bash
pnpm add -D @r1oga/eslint
echo '@r1oga/prettier' > .prettierrc.yaml
cp node_modules/@r1oga/prettier/.prettierignore .prettierignore
lib=@r1oga/prettier-config
pnpm add -D $lib
echo "\"$lib\"" > .prettierrc.yaml
cp node_modules/$lib/.prettierignore .prettierignore

View File

@@ -1,7 +1,7 @@
{
"name": "@r1oga/prettier",
"name": "@r1oga/config-prettier",
"version": "1.0.0",
"description": "Share Prettier configuration",
"description": "Shared prettier configuration",
"main": ".prettierrc.yaml",
"files": [
".prettierrc.yaml",