Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splits core and app into separate packages, adds complete configuration for dev and production #69

Closed
wants to merge 9 commits into from

Conversation

christopher-johnson
Copy link
Contributor

@christopher-johnson christopher-johnson commented Dec 1, 2018

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 of mirador3-app for an non-optimized production app build is also be provided and can be created by running npm 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 then lerna bootstrap can be used from root to install.
After install, then lerna run build can be run from root which builds everything and then lerna 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 #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.

closes ProjectMirador#66
adds ejected create react app configuration to app
moves tests to subdirectories of components
linting changes
closes ProjectMirador#68
handles prop updates in Window
replaces binds with arrow functions
excludes console in eslint
adds build to .gitignore
adds lerna.json
@christopher-johnson christopher-johnson force-pushed the history branch 5 times, most recently from e8143f1 to 6e4b807 Compare December 1, 2018 22:13
adds coverage reports
replaces .babelrc with package.json config in core
adds new travis build
adds mirador3-e2e-tests package
@mejackreed
Copy link
Collaborator

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?

@christopher-johnson
Copy link
Contributor Author

yes. I will be there. Look forward to discussing this then.

@mejackreed
Copy link
Collaborator

Excellent!

refactors common components into common package
adds minimal app build to e2e tests and removes dist binary
@christopher-johnson christopher-johnson force-pushed the history branch 5 times, most recently from 6253c86 to b10bb41 Compare December 8, 2018 16:09
@christopher-johnson christopher-johnson force-pushed the history branch 5 times, most recently from 542c435 to 0b313c5 Compare December 8, 2018 17:51
adds unit test shell for unconnected App
@christopher-johnson christopher-johnson force-pushed the history branch 3 times, most recently from 3ae4bcf to 75de719 Compare December 8, 2018 23:06
@christopher-johnson christopher-johnson force-pushed the history branch 4 times, most recently from dd568ff to eccfc1e Compare December 8, 2018 23:30
use app lib for e2e tests
@christopher-johnson
Copy link
Contributor Author

I close this per discussion in #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants