Skip to content

Commit

Permalink
build: move to turborepo
Browse files Browse the repository at this point in the history
- fix eslint package
- move scripts to zx mjs
- clean up root config
  • Loading branch information
juliencrn committed Jun 6, 2023
1 parent c4e2ae5 commit 1ac0d41
Show file tree
Hide file tree
Showing 19 changed files with 789 additions and 4,840 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ npm-debug.log*
.npm
.cache
.eslintcache
.turbo

# Compiled stuff
dist
Expand Down
15 changes: 12 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,17 @@
"usehooks"
],
"eslint.workingDirectories": [
{ "directory": ".", "changeProcessCWD": true },
{ "directory": "website", "changeProcessCWD": true },
{ "directory": "packages/eslint-config-custom", "changeProcessCWD": true }
{
"directory": "apps/web",
"changeProcessCWD": true
},
{
"directory": "packages/eslint-config-custom",
"changeProcessCWD": true
},
{
"directory": "packages/usehooks-ts",
"changeProcessCWD": true
}
]
}
28 changes: 0 additions & 28 deletions jest.config.ts

This file was deleted.

68 changes: 13 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,41 @@
{
"name": "usehooks-ts",
"private": false,
"private": true,
"version": "2.9.1",
"description": "React hook library, ready to use, written in Typescript.",
"author": "Julien CARON <[email protected]>",
"homepage": "https://usehooks-ts.com",
"module": "true",
"keywords": [
"typescript",
"react",
"hooks"
],
"license": "MIT",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
}
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "pnpm test:watch",
"prebuild": "pnpm clean && pnpm test",
"build": "pnpm build:cjs && pnpm build:esm",
"build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs --target es5",
"build:esm": "tsc -p tsconfig.build.json --module esNext --outDir dist/esm --target es6",
"postbuild": "pnpm copy:hooks && pnpm update:readme",
"pretest": "pnpm lint && pnpm types-check",
"test": "jest",
"test:watch": "pnpm test -- --watch --silent",
"test:coverage": "ts-node ./scripts/coverage.ts",
"clean": "rimraf -rf ./dist",
"build": "turbo run build",
"test": "turbo run test",
"clean": "turbo run clean",
"format": "prettier --write \"**/*.{json,md,mdx,css,scss,yaml,yml}\"",
"lint": "eslint '**/*.{js,jsx,ts,tsx}'",
"types-check": "tsc --noEmit",
"lint": "turbo run lint",
"types-check": "turbo run types-check",
"bump": "bump --tag 'usehooks-ts@%s' --commit 'release: usehooks-ts@%s'",
"deploy": "pnpm test && pnpm bump && npm publish",
"update:readme": "ts-node ./scripts/updateReadme.ts",
"copy:hooks": "rimraf -rf ./website/generated && ts-node ./scripts/copyHooks.ts",
"plop": "plop && pnpm update:readme && pnpm format"
"test:coverage": "zx ./scripts/coverage.mjs",
"update-readme": "zx ./scripts/updateReadme.mjs",
"generate-docs": "rimraf -rf ./apps/web/generated && zx ./scripts/copyHooks.mjs"
},
"devDependencies": {
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^7.0.2",
"@types/jest": "^29.0.3",
"@types/node": "^18.7.18",
"@types/react": "17.0.0",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"all-contributors-cli": "^6.20.0",
"date-fns": "^2.29.3",
"eslint": "^8.9.0",
"eslint-config-custom": "./packages/eslint-config-custom",
"eslint-plugin-tree-shaking": "^1.10.0",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"plop": "^3.0.5",
"prettier": "^2.5.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"rimraf": "^3.0.2",
"ts-jest": "^29.0.1",
"ts-node": "^10.2.1",
"typescript": "^4.8.3",
"version-bump-prompt": "^6.1.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"version-bump-prompt": "^6.1.0",
"zx": "^7.2.2"
},
"engines": {
"node": ">=16.15.0",
"npm": ">=8"
"node": ">=16.15.0"
},
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/juliencrn/usehooks-ts"
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-custom/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const eslintrc = require("./.eslintrc.js");
const eslintrc = require('./.eslintrc.js')

module.exports = eslintrc;
module.exports = eslintrc
Loading

0 comments on commit 1ac0d41

Please sign in to comment.