mirror of
https://github.com/zkitter/configs.git
synced 2026-01-09 06:58:05 -05:00
Ask to overwrite config files when installing
This commit is contained in:
4
.github/workflows/publish.yaml
vendored
4
.github/workflows/publish.yaml
vendored
@@ -4,7 +4,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [closed]
|
types: [closed]
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths: ['packages/*']
|
paths: ['packages/**']
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
restore-keys: ${{ runner.os }}-pnpm-store-
|
restore-keys: ${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: pnpm ci
|
run: pnpm i
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: pnpm run publish
|
run: pnpm run publish
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -rf node_modules && lerna clean",
|
"clean": "rm -rf node_modules && lerna clean",
|
||||||
"publish": "lerna publish -y --no-private --pre-id ci --npm-tag=ci --force-publish=* --registry '@r1oga:registry=https://npm.pkg.github.com' --message ':package: Publish'"
|
"publish": "lerna publish -y --no-private --preid ci --npm-tag=ci --force-publish=* --registry '@r1oga:registry=https://npm.pkg.github.com' --message ':package: Publish'"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"lerna": "^6.1.0"
|
"lerna": "^6.1.0"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "sh postinstall.sh"
|
"postinstall": "bash postinstall.sh"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# see sharing eslint config & npm scoped modules https://eslint.org/docs/latest/developer-guide/shareable-configs#npm-scoped-modules
|
# see sharing eslint config & npm scoped modules https://eslint.org/docs/latest/developer-guide/shareable-configs#npm-scoped-modules
|
||||||
echo "extends: ['@r1oga']" > "$INIT_CWD/.eslintrc.yaml"
|
if [[ ! -f "$INIT_CWD/.eslintrc.yaml" ]];then
|
||||||
cp .eslintignore "$INIT_CWD/.eslintignore"
|
echo "extends: ['@r1oga']" > "$INIT_CWD/.eslintrc.yaml"
|
||||||
|
else
|
||||||
|
read -p "overwrite .eslintrc.yaml?(Yn) " overwrite
|
||||||
|
if [[ -z "$overwrite" || "$overwrite" -eq "Y" || "$overwrite" -eq "y" ]];then
|
||||||
|
echo "extends: ['@r1oga']" > "$INIT_CWD/.eslintrc.yaml"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -i .eslintignore "$INIT_CWD/.eslintignore"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "js-yaml .prettierrc.yaml > .prettierrc.json",
|
"build": "js-yaml .prettierrc.yaml > .prettierrc.json",
|
||||||
"postinstall": "sh postinstall.sh"
|
"postinstall": "bash postinstall.sh"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"prettier": "^2.8.1"
|
"prettier": "^2.8.1"
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "'@r1oga/prettier-config'" > "$INIT_CWD/.prettierrc.yaml"
|
if [[ ! -f "$INIT_CWD/.prettierrc.yaml" ]];then
|
||||||
cp .prettierignore "$INIT_CWD/.prettierignore"
|
echo "'@r1oga/prettier-config'" > "$INIT_CWD/.prettierrc.yaml"
|
||||||
|
else
|
||||||
|
# shellcheck disable=SC2162
|
||||||
|
read -p "overwrite .prettierrc.yaml?(Yn) " overwrite
|
||||||
|
if [[ -z "$overwrite" || "$overwrite" -eq "Y" || "$overwrite" -eq "y" ]];then
|
||||||
|
echo "'@r1oga/prettier-config'" > "$INIT_CWD/.prettierrc.yaml"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -i .prettierignore "$INIT_CWD/.prettierignore"
|
||||||
Reference in New Issue
Block a user