Skip to content

Commit

Permalink
Implement monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Aug 8, 2023
1 parent 3cf9999 commit 56a0470
Show file tree
Hide file tree
Showing 72 changed files with 922 additions and 2,317 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions .eslintrc.json

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
env:
HUSKY: 0

- name: Build package
run: yarn build

- name: Run tests
run: yarn lint

Expand Down Expand Up @@ -72,6 +75,9 @@ jobs:
env:
HUSKY: 0

- name: Build package
run: yarn build

- name: Run type checking
run: yarn tsc

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ jobs:
- name: Publish with latest tag
if: github.event.release.prelease == false
run: yarn npm publish --tag latest
working-directory: package
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish with next tag
if: github.event.release.prelease == true
run: yarn npm publish --tag next
working-directory: package
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.cache
.yarn
coverage
dist
*.yml
yarnrc.yml
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions .yarn/plugins/plugin-remove-postinstall.cjs

This file was deleted.

3 changes: 2 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ logFilters:
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/plugin-remove-postinstall.cjs
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
212 changes: 2 additions & 210 deletions README.md

Large diffs are not rendered by default.

102 changes: 15 additions & 87 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,99 +1,27 @@
{
"name": "react-calendar",
"version": "4.6.0",
"description": "Ultimate calendar for your React app.",
"name": "react-calendar-monorepo",
"version": "1.0.0",
"description": "react-calendar monorepo",
"private": true,
"type": "module",
"sideEffects": [
"*.css"
"workspaces": [
"package",
"test"
],
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"source": "./src/index.ts",
"types": "./dist/cjs/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./dist/Calendar.css": "./dist/Calendar.css"
},
"scripts": {
"build": "yarn build-js && yarn copy-styles",
"build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package",
"build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext",
"build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs",
"build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
"clean": "rimraf dist",
"copy-styles": "cpy 'src/**/*.css' dist",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"build": "yarn workspace react-calendar build",
"dev": "yarn workspace react-calendar watch & yarn workspace test dev",
"lint": "yarn workspaces foreach run lint",
"postinstall": "husky install",
"prepack": "yarn clean && yarn build",
"prettier": "prettier --check . --cache",
"test": "yarn lint && yarn tsc && yarn prettier && yarn unit",
"tsc": "tsc --noEmit",
"unit": "vitest",
"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\""
},
"keywords": [
"calendar",
"date",
"date-picker",
"month-picker",
"react"
],
"author": {
"name": "Wojciech Maj",
"email": "kontakt@wojtekmaj.pl"
},
"license": "MIT",
"dependencies": {
"@wojtekmaj/date-utils": "^1.1.3",
"clsx": "^2.0.0",
"get-user-locale": "^2.2.1",
"prop-types": "^15.6.0",
"tiny-warning": "^1.0.0"
"prettier": "yarn workspaces foreach run prettier",
"test": "yarn workspaces foreach run test",
"tsc": "yarn workspaces foreach run tsc",
"unit": "yarn workspaces foreach run unit"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/react": "^14.0.0",
"@types/node": "*",
"@types/react": "*",
"cpy-cli": "^5.0.0",
"eslint": "^8.26.0",
"eslint-config-wojtekmaj": "^0.9.0",
"husky": "^8.0.0",
"jsdom": "^21.1.0",
"nodemon": "^3.0.0",
"prettier": "^2.7.0",
"pretty-quick": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^3.0.0",
"typescript": "^5.0.0",
"vitest": "^0.30.1"
},
"peerDependencies": {
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"publishConfig": {
"access": "public",
"provenance": true
},
"files": [
"dist",
"src"
],
"repository": {
"type": "git",
"url": "https://github.com/wojtekmaj/react-calendar.git"
"pretty-quick": "^3.1.0"
},
"funding": "https://github.com/wojtekmaj/react-calendar?sponsor=1",
"packageManager": "yarn@3.1.0"
}
2 changes: 2 additions & 0 deletions package/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
3 changes: 3 additions & 0 deletions package/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "wojtekmaj/react-no-automatic-runtime"
}
1 change: 1 addition & 0 deletions package/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
21 changes: 21 additions & 0 deletions package/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017–2023 Wojciech Maj

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 56a0470

Please sign in to comment.