Closed christopher-johnson closed 5 years ago
Thanks for modifying and resubmitting. I think it will be good to discuss this in person and perhaps in a larger group. Are you coming the working meeting in Edinburgh?
yes. I will be there. Look forward to discussing this then.
Excellent!
I close this per discussion in #66
This structure provides a basis for extensible "package oriented" component design and testing with a development server and environment and also a production deployment of mirador app. There are many, many options with webpack, so this should not be considered complete, but does provide reasonable defaults for further enhancement.
The separation of versioned libraries and feature/plugin components from the main app allows maintainability as the code-base grows. Currently, there is one library,
mirador3-core
which provides redux actions and reducers.As a library then,
mirador3-core
is just a npm package and can be published by itself. Currently, since it is not published, it is referenced in the package.json with "file://"The option in
minimal_redux_poc
to provide a distribution binary ofmirador3-app
for an non-optimized production app build is also be provided and can be created by runningnpm run dist
. Note that production deployment with webpack primarily involves chunking, and this cannot be achieved with a distribution binary. Chunking optimizations are particularly advantageous for mobile platforms.The procedure from a fresh clone of the repo is install, build dep packages (i.e. core, etc.), and run. See the
.travis.yml
file for the process. Until core is published, installing locally referenced packages must be done from each package root. If all deps packages are published thenlerna bootstrap
can be used from root to install. After install, thenlerna run build
can be run from root which builds everything and thenlerna run start
to start the app.This is a resubmission that moves src files from
mirador_redux_poc
to retain history. That directory is now empty of source except for two IT tests.See https://github.com/ProjectMirador/research-and-demos/pull/67 for previous submission review comments.
An integration testing package that uses Cypress has also been created in
packages/mirador3-e2e-tests
. This currently depends on the distribution binary, but offers an extensible configuration to support multiple app builds from imports using a published artifact with webpack.