Skip to content

Commit e608e99

Browse files
committed
Convert mirador to a monorepo.
1 parent 2c73d0a commit e608e99

File tree

639 files changed

+246
-113
lines changed

Some content is hidden

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

639 files changed

+246
-113
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
dist/
22
coverage/
33
node_modules/
4+
packages/*/dist/
5+
packages/*/coverage/
6+
packages/*/node_modules/
47
package-lock.json
58
*.log
6-
*.tgz
9+
*.tgz

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://www.netlify.com/docs/netlify-toml-reference/ for more
33

44
[build]
5-
publish = "dist/"
5+
publish = "packages/mirador/dist/"
66

77
[[redirects]]
88
from = "/"

package.json

+15-111
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,24 @@
11
{
2-
"name": "mirador",
3-
"version": "4.0.0-alpha.5",
2+
"name": "@projectmirador/monorepo",
3+
"version": "4.0.0-alpha.3",
44
"description": "An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.",
5-
"type": "module",
6-
"main": "./dist/mirador.js",
7-
"module": "./dist/mirador.es.js",
8-
"files": [
9-
"dist",
10-
"src"
11-
],
12-
"sideEffects": false,
13-
"exports": {
14-
"./src": "./src/index.js"
15-
},
16-
"scripts": {
17-
"build": "vite build --config vite.config.js",
18-
"clean": "rm -rf ./dist",
19-
"lint": "node_modules/.bin/eslint ./ && npm run lint:translations && npm run lint:containers",
20-
"lint:containers": "node ./scripts/container-lint.js",
21-
"lint:translations": "node ./scripts/i18n-lint.js",
22-
"size": "bundlewatch --config bundlewatch.config.json",
23-
"start": "vite",
24-
"test": "npm run build && npm run lint && npm run size && vitest run"
25-
},
26-
"license": "Apache-2.0",
5+
276
"contributors": [
287
"Drew Winget <[email protected]> (https://aeschylus.net/)",
298
"Jack Reed <[email protected]> (https://www.jack-reed.com)"
309
],
31-
"repository": "https://github.com/ProjectMirador/mirador",
32-
"dependencies": {
33-
"@custom-react-hooks/use-element-size": "^1.5.1",
34-
"@emotion/cache": "^11.11.0",
35-
"@emotion/react": "^11.10.6",
36-
"@emotion/styled": "^11.10.6",
37-
"@hello-pangea/dnd": "^16.0.1 || ^17.0.0",
38-
"@mui/icons-material": "^5.11.16",
39-
"@mui/lab": "^5.0.0-alpha.134",
40-
"@mui/material": "^5.13.5",
41-
"@mui/utils": "^5.13.1",
42-
"@mui/x-tree-view": "^6.17.0",
43-
"@react-aria/live-announcer": "^3.1.2",
44-
"@redux-devtools/extension": "^3.3.0",
45-
"classnames": "^2.2.6",
46-
"deepmerge": "^4.2.2",
47-
"dompurify": "^3.0.0",
48-
"i18next": "^21.0.0 || ^22.0.0 || ^23.0.0",
49-
"lodash": "^4.17.11",
50-
"manifesto.js": "^4.2.0",
51-
"merge-refs": "^1.3.0",
52-
"normalize-url": "^4.5.0",
53-
"openseadragon": "^2.4.2 || ^3.0.0 || 4.0.x || ^4.1.1 || ^5.0.0",
54-
"prop-types": "^15.6.2",
55-
"rdndmb-html5-to-touch": "^8.0.0",
56-
"re-reselect": "^5.0.0",
57-
"react-copy-to-clipboard": "^5.0.1",
58-
"react-dnd": "^16.0.0",
59-
"react-dnd-html5-backend": "^16.0.0",
60-
"react-dnd-multi-backend": "^8.0.0",
61-
"react-dnd-touch-backend": "^16.0.0",
62-
"react-error-boundary": "^4.1.2",
63-
"react-full-screen": "^1.1.1",
64-
"react-i18next": "^13.0.0 || ^14.0.0 || ^15.0.0",
65-
"react-image": "^4.0.1",
66-
"react-intersection-observer": "^9.0.0",
67-
"react-mosaic-component2": "^6.0.0",
68-
"react-redux": "^8.0.0 || ^9.0.0",
69-
"react-resize-observer": "^1.1.1",
70-
"react-rnd": "^10.1",
71-
"react-virtualized-auto-sizer": "^1.0.2",
72-
"react-window": "^1.8.5",
73-
"redux": "^5.0.0",
74-
"redux-saga": "^1.1.3",
75-
"redux-thunk": "^3.1.0",
76-
"reselect": "^5.0.0",
77-
"stylis": "^4.3.0",
78-
"stylis-plugin-rtl": "^2.1.1",
79-
"url": "^0.11.0",
80-
"use-debounce": "^10.0.4",
81-
"use-effect-event": "^1.0.2",
82-
"uuid": "^8.1.0 || ^9.0.0 || ^10.0.0 || ^11.0.0"
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/projectmirador/mirador.git"
8313
},
84-
"devDependencies": {
85-
"@testing-library/dom": "^10.4.0",
86-
"@testing-library/jest-dom": "^6.1.5",
87-
"@testing-library/react": "^16.0.1",
88-
"@testing-library/user-event": "^14.4.3",
89-
"@vitejs/plugin-react": "^4.3.3",
90-
"@vitest/ui": "^2.1.4",
91-
"bundlewatch": "^0.4.0",
92-
"chalk": "^5.3.0",
93-
"eslint": "^8.11.0",
94-
"eslint-config-airbnb": "^19.0.4",
95-
"eslint-plugin-flowtype": "^8.0.3",
96-
"eslint-plugin-import": "^2.25.4",
97-
"eslint-plugin-jest-dom": "^5.1.0",
98-
"eslint-plugin-jsx-a11y": "^6.4.1",
99-
"eslint-plugin-react": "^7.29.4",
100-
"eslint-plugin-react-hooks": "^4.6.0",
101-
"eslint-plugin-testing-library": "^6.2.0",
102-
"glob": "^10.3.0",
103-
"happy-dom": "^15.11.3",
104-
"http-server": "^14.1.0",
105-
"jsdom": "^25.0.0",
106-
"puppeteer": "^23.0.0",
107-
"react": "^18.0.0",
108-
"react-dnd-test-backend": "^16.0.1",
109-
"react-dom": "^18.0.0",
110-
"redux-mock-store": "^1.5.1",
111-
"redux-saga-test-plan": "^4.0.0-rc.3",
112-
"vite": "^5.4.11",
113-
"vitest": "^2.1.4",
114-
"vitest-fetch-mock": "^0.4.2"
14+
"license": "Apache-2.0",
15+
"scripts": {
16+
"build": "npm run build --workspaces",
17+
"lint": "npm run lint --workspaces",
18+
"start": "npm run start --workspace mirador",
19+
"test": "npm run test --workspaces"
11520
},
116-
"peerDependencies": {
117-
"react": "^18.0.0",
118-
"react-dom": "^18.0.0"
119-
}
21+
"workspaces": [
22+
"./packages/mirador"
23+
]
12024
}

packages/mirador/.eslintignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dist/
2+
config/
3+
coverage/
4+
styles/
5+
packages/mirador/dist/
6+
packages/mirador/node_modules/

packages/mirador/.eslintrc

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 2022,
4+
"sourceType": "module",
5+
"ecmaFeatures": {
6+
"jsx": true
7+
}
8+
},
9+
"extends": [
10+
"airbnb",
11+
"plugin:react/recommended",
12+
"plugin:react-hooks/recommended",
13+
"plugin:testing-library/react"
14+
],
15+
"globals": {
16+
"page": true,
17+
"document": true,
18+
"vi": true
19+
},
20+
"plugins": [
21+
"react",
22+
"react-hooks",
23+
"testing-library"
24+
],
25+
"rules": {
26+
"import/no-unresolved": [
27+
2, { "ignore": ["test-utils"] }
28+
],
29+
"import/prefer-default-export": "off",
30+
"no-console": "off",
31+
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
32+
"no-unused-vars": "off",
33+
"no-undef": "off",
34+
"no-restricted-syntax": ["warn", "WithStatement"],
35+
"no-restricted-globals": ["error"],
36+
"eqeqeq": ["warn", "smart"],
37+
"no-use-before-define": [
38+
"warn",
39+
{
40+
"functions": false,
41+
"classes": false,
42+
"variables": false
43+
},
44+
],
45+
"no-mixed-operators": [
46+
"warn",
47+
{
48+
"groups": [
49+
["&", "|", "^", "~", "<<", ">>", ">>>"],
50+
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
51+
["&&", "||"],
52+
["in", "instanceof"],
53+
],
54+
"allowSamePrecedence": false,
55+
},
56+
],
57+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
58+
"require-jsdoc": ["error", {
59+
"require": {
60+
"FunctionDeclaration": true,
61+
"MethodDefinition": true,
62+
"ClassDeclaration": true,
63+
"ArrowFunctionExpression": true,
64+
"FunctionExpression": true
65+
}
66+
}],
67+
"no-underscore-dangle": "off",
68+
"react/prefer-stateless-function": "off",
69+
"sort-keys": ["error", "asc", {
70+
"caseSensitive": false,
71+
"natural": false
72+
}],
73+
"react/jsx-props-no-spreading": "off",
74+
"react/function-component-definition": "off",
75+
"default-param-last": "off",
76+
"arrow-parens": "off",
77+
"import/no-anonymous-default-export": "off",
78+
"import/no-extraneous-dependencies": "off",
79+
"max-len": ["error", {
80+
"code": 120,
81+
"ignoreComments": true,
82+
"ignoreStrings": true,
83+
"ignoreTemplateLiterals": true,
84+
"ignoreRegExpLiterals": true
85+
}],
86+
"react/jsx-uses-react": "off",
87+
"react/react-in-jsx-scope": "off",
88+
"react/require-default-props": [2, {
89+
"functions": "defaultArguments"
90+
}],
91+
"react-hooks/exhaustive-deps": "error",
92+
"testing-library/render-result-naming-convention": "off",
93+
"testing-library/no-render-in-lifecycle": [
94+
"error",
95+
{
96+
"allowTestingFrameworkSetupHook": "beforeEach"
97+
}
98+
]
99+
}
100+
}
File renamed without changes.

0 commit comments

Comments
 (0)