Skip to content

Commit 246262d

Browse files
committed
Implement monorepo
1 parent 8b38466 commit 246262d

Some content is hidden

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

43 files changed

+905
-2426
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: packages/react-datetime-picker
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: packages/react-datetime-picker
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 & 166 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 14 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,26 @@
11
{
2-
"name": "react-datetime-picker",
3-
"version": "5.5.1",
4-
"description": "A date range picker for your React app.",
2+
"name": "react-datetime-picker-monorepo",
3+
"version": "1.0.0",
4+
"description": "react-datetime-picker monorepo",
55
"type": "module",
6-
"sideEffects": [
7-
"*.css"
6+
"workspaces": [
7+
"packages/*",
8+
"test"
89
],
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/DateTimeInput": {
19-
"import": "./dist/esm/DateTimeInput.js",
20-
"require": "./dist/cjs/DateTimeInput.js"
21-
},
22-
"./dist/DateTimeInput.js": {
23-
"import": "./dist/esm/DateTimeInput.js",
24-
"require": "./dist/cjs/DateTimeInput.js"
25-
},
26-
"./dist/cjs/DateTimeInput": "./dist/cjs/DateTimeInput.js",
27-
"./dist/cjs/DateTimeInput.js": "./dist/cjs/DateTimeInput.js",
28-
"./dist/esm/DateTimeInput": "./dist/esm/DateTimeInput.js",
29-
"./dist/esm/DateTimeInput.js": "./dist/esm/DateTimeInput.js",
30-
"./dist/DateTimePicker.css": "./dist/DateTimePicker.css"
31-
},
3210
"scripts": {
33-
"build": "yarn build-js && yarn copy-styles",
34-
"build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package && yarn build-js-cjs-replace",
35-
"build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext",
36-
"build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs",
37-
"build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
38-
"build-js-cjs-replace": "replace-in-files --string='/dist/esm/' --replacement='/dist/cjs/' dist/cjs/**/*",
39-
"clean": "rimraf dist",
40-
"copy-styles": "cpy 'src/**/*.css' dist",
41-
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
11+
"build": "yarn workspace react-datetime-picker build",
12+
"dev": "yarn workspace react-datetime-picker watch & yarn workspace test dev",
13+
"lint": "yarn workspaces foreach run lint",
4214
"postinstall": "husky install",
43-
"prepack": "yarn clean && yarn build",
44-
"prettier": "prettier --check . --cache",
45-
"test": "yarn lint && yarn tsc && yarn prettier && yarn unit",
46-
"tsc": "tsc --noEmit",
47-
"unit": "vitest",
48-
"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\""
49-
},
50-
"keywords": [
51-
"calendar",
52-
"date",
53-
"date-picker",
54-
"datetime",
55-
"datetime-picker",
56-
"react",
57-
"time",
58-
"time-picker"
59-
],
60-
"author": {
61-
"name": "Wojciech Maj",
62-
"email": "kontakt@wojtekmaj.pl"
63-
},
64-
"license": "MIT",
65-
"dependencies": {
66-
"@wojtekmaj/date-utils": "^1.1.3",
67-
"clsx": "^2.0.0",
68-
"get-user-locale": "^2.2.1",
69-
"make-event-props": "^1.6.0",
70-
"prop-types": "^15.6.0",
71-
"react-calendar": "^4.6.0",
72-
"react-clock": "^4.5.0",
73-
"react-date-picker": "^10.5.0",
74-
"react-fit": "^1.7.0",
75-
"react-time-picker": "^6.5.0"
15+
"prettier": "yarn workspaces foreach run prettier",
16+
"test": "yarn workspaces foreach run test",
17+
"tsc": "yarn workspaces foreach run tsc",
18+
"unit": "yarn workspaces foreach run unit"
7619
},
7720
"devDependencies": {
78-
"@testing-library/dom": "^9.0.0",
79-
"@testing-library/jest-dom": "^5.15.0",
80-
"@testing-library/react": "^14.0.0",
81-
"@testing-library/user-event": "^14.4.0",
82-
"@types/node": "*",
83-
"@types/react": "*",
84-
"cpy-cli": "^5.0.0",
85-
"eslint": "^8.26.0",
86-
"eslint-config-wojtekmaj": "^0.9.0",
8721
"husky": "^8.0.0",
88-
"jsdom": "^21.1.0",
89-
"nodemon": "^3.0.0",
9022
"prettier": "^2.7.0",
91-
"pretty-quick": "^3.1.0",
92-
"react": "^18.2.0",
93-
"react-dom": "^18.2.0",
94-
"replace-in-files-cli": "^2.2.0",
95-
"rimraf": "^3.0.0",
96-
"typescript": "^5.0.0",
97-
"vitest": "^0.34.0",
98-
"vitest-canvas-mock": "^0.2.2"
99-
},
100-
"peerDependencies": {
101-
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
102-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
103-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
104-
},
105-
"peerDependenciesMeta": {
106-
"@types/react": {
107-
"optional": true
108-
}
109-
},
110-
"publishConfig": {
111-
"access": "public",
112-
"provenance": true
113-
},
114-
"files": [
115-
"dist",
116-
"src"
117-
],
118-
"repository": {
119-
"type": "git",
120-
"url": "https://github.com/wojtekmaj/react-datetime-picker.git"
23+
"pretty-quick": "^3.1.0"
12124
},
122-
"funding": "https://github.com/wojtekmaj/react-datetime-picker?sponsor=1",
12325
"packageManager": "yarn@3.1.0"
12426
}

0 commit comments

Comments
 (0)