-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactors common components into common package adds minimal app build to e2e tests and removes dist binary
- Loading branch information
1 parent
6d870fd
commit bbd4082
Showing
68 changed files
with
565 additions
and
187 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build/ | ||
config/ | ||
dist/ | ||
scripts/ | ||
coverage/ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 2 additions & 7 deletions
9
packages/mirador3-app/package.json → packages/mirador3-app-base/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
config/ | ||
lib/ | ||
scripts/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This is a custom Jest transformer turning style imports into empty objects. | ||
// http://facebook.github.io/jest/docs/en/webpack.html | ||
|
||
module.exports = { | ||
process() { | ||
return 'module.exports = {};'; | ||
}, | ||
getCacheKey() { | ||
// The output is always the same. | ||
return 'cssTransform'; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const path = require('path'); | ||
|
||
// This is a custom Jest transformer turning file imports into filenames. | ||
// http://facebook.github.io/jest/docs/en/webpack.html | ||
|
||
module.exports = { | ||
process(src, filename) { | ||
const assetFilename = JSON.stringify(path.basename(filename)); | ||
|
||
if (filename.match(/\.svg$/)) { | ||
return `module.exports = { | ||
__esModule: true, | ||
default: ${assetFilename}, | ||
ReactComponent: (props) => ({ | ||
$$typeof: Symbol.for('react.element'), | ||
type: 'svg', | ||
ref: null, | ||
key: null, | ||
props: Object.assign({}, props, { | ||
children: ${assetFilename} | ||
}) | ||
}), | ||
};`; | ||
} | ||
|
||
return `module.exports = ${assetFilename};`; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"collectCoverageFrom": [ | ||
"src/**/*.{js,jsx,ts,tsx}", | ||
"!src/**/*.d.ts" | ||
], | ||
"coverageDirectory": "<rootDir>/coverage", | ||
"coverageReporters": ["html"], | ||
"resolver": "jest-pnp-resolver", | ||
"setupFiles": [ | ||
"jest-canvas-mock" | ||
], | ||
"setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.js", | ||
"testMatch": [ | ||
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}", | ||
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}" | ||
], | ||
"testEnvironment": "jsdom", | ||
"testURL": "http://localhost", | ||
"transform": { | ||
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest", | ||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js", | ||
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$", | ||
"^.+\\.module\\.(css|sass|scss)$" | ||
], | ||
"moduleNameMapper": { | ||
"^react-native$": "react-native-web", | ||
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy" | ||
}, | ||
"moduleFileExtensions": [ | ||
"web.js", | ||
"js", | ||
"web.ts", | ||
"ts", | ||
"web.tsx", | ||
"tsx", | ||
"json", | ||
"web.jsx", | ||
"jsx", | ||
"node" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "mirador3-common", | ||
"version": "0.1.0", | ||
"description": "", | ||
"license": "Apache-2.0", | ||
"main": "lib/index.js", | ||
"repository": "https://github.com/ProjectMirador/research-and-demos/mirador3-common", | ||
"scripts": { | ||
"lint": "node_modules/.bin/eslint ./", | ||
"test": "npm run lint && jest -c jest.json", | ||
"test:watch": "jest -c jest.json --watch", | ||
"test:coverage": "jest -c jest.json --coverage", | ||
"build": "webpack --mode production", | ||
"build:watch": "node_modules/.bin/webpack --watch" | ||
}, | ||
"dependencies": { | ||
"css-ns": "^1.2.2", | ||
"enzyme": "^3.7.0", | ||
"jest": "23.6.0", | ||
"jest-fetch-mock": "^2.0.1", | ||
"mirador3-core": "file:../mirador3-core", | ||
"node-fetch": "2.1.1", | ||
"openseadragon": "^2.4.0", | ||
"prop-types": "^15.6.2", | ||
"react": "^16.6.3", | ||
"react-dom": "^16.6.3", | ||
"redux": "3.7.2", | ||
"react-redux": "^5.0.7" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.1.6", | ||
"@babel/preset-env": "^7.1.6", | ||
"@babel/plugin-proposal-class-properties": "^7.2.1", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-eslint": "9.0.0", | ||
"babel-jest": "23.6.0", | ||
"babel-loader": "^8.0.4", | ||
"babel-plugin-named-asset-import": "^0.2.3", | ||
"@babel/preset-react": "7.0.0", | ||
"enzyme": "^3.7.0", | ||
"enzyme-adapter-react-16": "^1.7.0", | ||
"eslint": "^5.9.0", | ||
"eslint-config-airbnb": "^17.1.0", | ||
"eslint-loader": "^2.1.1", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-jest": "^22.1.0", | ||
"eslint-plugin-jsx-a11y": "^6.1.2", | ||
"eslint-plugin-react": "^7.11.1", | ||
"jest": "23.6.0", | ||
"jest-canvas-mock": "^1.1.0", | ||
"jest-pnp-resolver": "1.0.1", | ||
"jest-resolve": "23.6.0", | ||
"jsdom": "^13.0.0", | ||
"react-app-polyfill": "^0.1.3", | ||
"react-dev-utils": "^6.1.1", | ||
"redux-mock-store": "^1.5.3", | ||
"webpack": "^4.24.0", | ||
"webpack-cli": "^3.1.2" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...r3-app/src/components/ManifestMetadata.js → ...ommon/src/components/ManifestMetadata.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.