0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

chore: add preinstall script to packages

This commit is contained in:
Gao Sun 2021-08-10 15:29:32 +08:00
parent b66f2e96df
commit 2c6a64892a
No known key found for this signature in database
GPG key ID: 0F0EFA2E36639F31
5 changed files with 5 additions and 7 deletions

View file

@ -7,6 +7,7 @@
"license": "UNLICENSED", "license": "UNLICENSED",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"precommit": "lint-staged", "precommit": "lint-staged",
"build": "rm -rf build/ && tsc", "build": "rm -rf build/ && tsc",
"lint": "eslint --format pretty --ext .ts src", "lint": "eslint --format pretty --ext .ts src",

View file

@ -15,6 +15,7 @@
"url": "git+https://github.com/logto-io/logto.git" "url": "git+https://github.com/logto-io/logto.git"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"build": "rm -rf lib/ && tsc", "build": "rm -rf lib/ && tsc",
"lint": "eslint --format pretty \"src/**\"", "lint": "eslint --format pretty \"src/**\"",
"prepack": "pnpm build" "prepack": "pnpm build"
@ -33,8 +34,5 @@
"eslintConfig": { "eslintConfig": {
"extends": "@logto" "extends": "@logto"
}, },
"prettier": "@logto/eslint-config/.prettierrc", "prettier": "@logto/eslint-config/.prettierrc"
"dependencies": {
"@logto/schemas": "^0.1.0"
}
} }

View file

@ -10,6 +10,7 @@
], ],
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"generate": "ts-node src/gen/index.ts && eslint --format pretty \"src/db-entries/**\" --fix", "generate": "ts-node src/gen/index.ts && eslint --format pretty \"src/db-entries/**\" --fix",
"build": "pnpm generate && rm -rf lib/ && tsc --p tsconfig.build.json", "build": "pnpm generate && rm -rf lib/ && tsc --p tsconfig.build.json",
"lint": "eslint --format pretty \"src/**\"", "lint": "eslint --format pretty \"src/**\"",

View file

@ -4,6 +4,7 @@
"license": "UNLICENSED", "license": "UNLICENSED",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"precommit": "lint-staged", "precommit": "lint-staged",
"dev:tsc": "tsc -b -w --preserveWatchOutput", "dev:tsc": "tsc -b -w --preserveWatchOutput",
"dev:razzle": "razzle start", "dev:razzle": "razzle start",

View file

@ -106,14 +106,11 @@ importers:
packages/phrases: packages/phrases:
specifiers: specifiers:
'@logto/eslint-config': ^0.1.0-rc.14 '@logto/eslint-config': ^0.1.0-rc.14
'@logto/schemas': ^0.1.0
'@logto/ts-config': ^0.1.0-rc.14 '@logto/ts-config': ^0.1.0-rc.14
eslint: ^7.31.0 eslint: ^7.31.0
eslint-formatter-pretty: ^4.1.0 eslint-formatter-pretty: ^4.1.0
prettier: ^2.3.2 prettier: ^2.3.2
typescript: ^4.3.5 typescript: ^4.3.5
dependencies:
'@logto/schemas': link:../schemas
devDependencies: devDependencies:
'@logto/eslint-config': 0.1.0-rc.14_aa6010e91de57dec3f7388187c7addf8 '@logto/eslint-config': 0.1.0-rc.14_aa6010e91de57dec3f7388187c7addf8
'@logto/ts-config': 0.1.0-rc.14_f847e35c67ce67b1737c27c823675243 '@logto/ts-config': 0.1.0-rc.14_f847e35c67ce67b1737c27c823675243