@mongodb-js/compass-home v7.0.1
home
The Compass plugin responsible for gluing together other plugins:
- compass-aggregations
- compass-auto-updates
- compass-collection
- compass-crud
- compass-database
- compass-databases-collections
- compass-deployment-awareness
- compass-export-to-language
- compass-field-store
- compass-find-in-page
- compass-import-export
- compass-indexes
- compass-instance
- compass-query-bar
- compass-query-history
- compass-schema-validation
- compass-server-version
- compass-serverstats
- compass-shell
- compass-sidebar
- compass-ssh-tunnel-status
- compass-status
Usage
Scripts
link-plugin: Links the Compass plugin and Compass for development along with React to ensure the
plugin and Compass are using the same React instance.
COMPASS_HOME=/path/to/my/compass npm run link-pluginunlink-plugin: Restores Compass and the plugin to their original unlinked state.
COMPASS_HOME=/path/to/my/compass npm run unlink-pluginElectron
Validate and test your component in an Electron window, styles included. The source automatically
compiles and the window content reloads when any file under ./src changes.
To start Electron and render your component, type npm start.
If you edit the source code and hit save, the source will rebuild and the window reload automatically. State is not maintained throughout reloads.
Enzyme
The test environment is configured to test components with Enzyme (including full mount mode through jsdom) and enzyme-chai. See the test folder for examples. Run npm test to execute the test suite.
Developing
Almost all of your development will happen in the ./src directory. Add new components to ./src/components, actions to ./src/actions/index.js and if you need additional stores, add them to ./src/stores.
To be able to debug the plugin inside compass make sure webpack prod config has devtool is set to source-map. If you want faster compiler time when you commit/push, switch it to false.
const config = {
target: 'electron-renderer',
devtool: 'source-map',
};Directory Structure
For completeness, below is a list of directories present in this module:
electroncode to start electron, open a browser window and load the source. You don't usually need to touch this, unless you want to render something other than the main component in Electron.distcompiled version of your components (plain javascript instead ofjsx) and styles (cssinstead ofless). Never change anything here as this entire folder gets automatically created and overwritten.srccomponents, actions and stores source code, as well as style files. This is the place to implement your own components.npm run compilewill use./srcas input and create./dist.testimplement your tests here, and name the files*.test.js.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago