Skip to content

Commit 0617c1d

Browse files
committed
Implement monorepo
1 parent 3cf9999 commit 0617c1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+922
-2317
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
env:
3939
HUSKY: 0
4040

41+
- name: Build package
42+
run: yarn build
43+
4144
- name: Run tests
4245
run: yarn lint
4346

@@ -72,6 +75,9 @@ jobs:
7275
env:
7376
HUSKY: 0
7477

78+
- name: Build package
79+
run: yarn build
80+
7581
- name: Run type checking
7682
run: yarn tsc
7783

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ jobs:
4242
- name: Publish with latest tag
4343
if: github.event.release.prelease == false
4444
run: yarn npm publish --tag latest
45+
working-directory: package
4546
env:
4647
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4748

4849
- name: Publish with next tag
4950
if: github.event.release.prelease == true
5051
run: yarn npm publish --tag next
52+
working-directory: package
5153
env:
5254
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.prettierignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
.cache
22
.yarn
3-
coverage
4-
dist
5-
*.yml
3+
yarnrc.yml

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/plugin-remove-postinstall.cjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ logFilters:
55
nodeLinker: node-modules
66

77
plugins:
8-
- path: .yarn/plugins/plugin-remove-postinstall.cjs
8+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
9+
spec: '@yarnpkg/plugin-workspace-tools'

README.md

Lines changed: 2 additions & 210 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 15 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,27 @@
11
{
2-
"name": "react-calendar",
3-
"version": "4.6.0",
4-
"description": "Ultimate calendar for your React app.",
2+
"name": "react-calendar-monorepo",
3+
"version": "1.0.0",
4+
"description": "react-calendar monorepo",
5+
"private": true,
56
"type": "module",
6-
"sideEffects": [
7-
"*.css"
7+
"workspaces": [
8+
"package",
9+
"test"
810
],
9-
"main": "./dist/cjs/index.js",
10-
"module": "./dist/esm/index.js",
11-
"source": "./src/index.ts",
12-
"types": "./dist/cjs/index.d.ts",
13-
"exports": {
14-
".": {
15-
"import": "./dist/esm/index.js",
16-
"require": "./dist/cjs/index.js"
17-
},
18-
"./dist/Calendar.css": "./dist/Calendar.css"
19-
},
2011
"scripts": {
21-
"build": "yarn build-js && yarn copy-styles",
22-
"build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package",
23-
"build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext",
24-
"build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs",
25-
"build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
26-
"clean": "rimraf dist",
27-
"copy-styles": "cpy 'src/**/*.css' dist",
28-
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
12+
"build": "yarn workspace react-calendar build",
13+
"dev": "yarn workspace react-calendar watch & yarn workspace test dev",
14+
"lint": "yarn workspaces foreach run lint",
2915
"postinstall": "husky install",
30-
"prepack": "yarn clean && yarn build",
31-
"prettier": "prettier --check . --cache",
32-
"test": "yarn lint && yarn tsc && yarn prettier && yarn unit",
33-
"tsc": "tsc --noEmit",
34-
"unit": "vitest",
35-
"watch": "yarn build-js-esm --watch & yarn build-js-cjs --watch & yarn build-js-cjs-package & nodemon --watch src --ext css --exec \"yarn copy-styles\""
36-
},
37-
"keywords": [
38-
"calendar",
39-
"date",
40-
"date-picker",
41-
"month-picker",
42-
"react"
43-
],
44-
"author": {
45-
"name": "Wojciech Maj",
46-
"email": "[email protected]"
47-
},
48-
"license": "MIT",
49-
"dependencies": {
50-
"@wojtekmaj/date-utils": "^1.1.3",
51-
"clsx": "^2.0.0",
52-
"get-user-locale": "^2.2.1",
53-
"prop-types": "^15.6.0",
54-
"tiny-warning": "^1.0.0"
16+
"prettier": "yarn workspaces foreach run prettier",
17+
"test": "yarn workspaces foreach run test",
18+
"tsc": "yarn workspaces foreach run tsc",
19+
"unit": "yarn workspaces foreach run unit"
5520
},
5621
"devDependencies": {
57-
"@testing-library/jest-dom": "^5.15.0",
58-
"@testing-library/react": "^14.0.0",
59-
"@types/node": "*",
60-
"@types/react": "*",
61-
"cpy-cli": "^5.0.0",
62-
"eslint": "^8.26.0",
63-
"eslint-config-wojtekmaj": "^0.9.0",
6422
"husky": "^8.0.0",
65-
"jsdom": "^21.1.0",
66-
"nodemon": "^3.0.0",
6723
"prettier": "^2.7.0",
68-
"pretty-quick": "^3.1.0",
69-
"react": "^18.2.0",
70-
"react-dom": "^18.2.0",
71-
"rimraf": "^3.0.0",
72-
"typescript": "^5.0.0",
73-
"vitest": "^0.30.1"
74-
},
75-
"peerDependencies": {
76-
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
77-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
78-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
79-
},
80-
"peerDependenciesMeta": {
81-
"@types/react": {
82-
"optional": true
83-
}
84-
},
85-
"publishConfig": {
86-
"access": "public",
87-
"provenance": true
88-
},
89-
"files": [
90-
"dist",
91-
"src"
92-
],
93-
"repository": {
94-
"type": "git",
95-
"url": "https://github.com/wojtekmaj/react-calendar.git"
24+
"pretty-quick": "^3.1.0"
9625
},
97-
"funding": "https://github.com/wojtekmaj/react-calendar?sponsor=1",
9826
"packageManager": "[email protected]"
9927
}

0 commit comments

Comments
 (0)