@mongodb-js/compass-indexes 4.22.0 → 4.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,69 +1 @@
1
- # Compass indexes plugin
2
-
3
- ## Usage
4
-
5
- ### Scripts
6
-
7
- `link-plugin`: Links the Compass plugin and Compass for development along with React to ensure the
8
- plugin and Compass are using the same React instance.
9
-
10
- ```shell
11
- COMPASS_HOME=/path/to/my/compass npm run link-plugin
12
- ```
13
-
14
- `unlink-plugin`: Restores Compass and the plugin to their original unlinked state.
15
-
16
- ```shell
17
- COMPASS_HOME=/path/to/my/compass npm run unlink-plugin
18
- ```
19
-
20
- ## Features
21
-
22
- #### Electron
23
-
24
- Validate and test your component in an Electron window, styles included. The source automatically
25
- compiles and the window content reloads when any file under `./src` changes.
26
-
27
- To start Electron and render your component, type `npm start`.
28
-
29
- #### Enzyme
30
-
31
- The test environment is configured to test components with [Enzyme][enzyme]
32
- (including full `mount` mode through [jsdom][jsdom]) and [enzyme-chai][enzyme-chai].
33
- See the test folder for examples. Run `npm test` to execute the test suite.
34
-
35
- ## Developing
36
-
37
- Almost all of your development will happen in the `./src` directory. Add new components
38
- to `./src/components`, actions to `./src/actions/index.js` and if you need additional
39
- stores, add them to `./src/stores`.
40
-
41
- To be able to debug the plugin inside `compass` make sure [webpack prod
42
- config](./config/webpack.prod.config.js) has `devtool` is set to `source-map`.
43
- If you want faster compiler time when you commit/push, switch it to `false.`
44
-
45
- ```js
46
- const config = {
47
- target: 'electron-renderer',
48
- devtool: 'source-map'
49
- }
50
- ```
51
-
52
- #### Directory Structure
53
-
54
- For completeness, below is a list of directories present in this module:
55
-
56
- - `electron` code to start electron, open a browser window and load the source.
57
- You don't usually need to touch this, unless you want to render something other
58
- than the main component in Electron.
59
- - `lib` compiled version of your components (plain javascript instead of `jsx`) and
60
- styles (`css` instead of `less`). Never change anything here as this entire folder
61
- gets automatically created and overwritten.
62
- - `src` components, actions and stores source code, as well as style files. This is the
63
- place to implement your own components. `npm run compile` will use `./src` as input
64
- and create `./lib`.
65
- - `test` implement your tests here, and name the files `*.test.js`.
66
-
67
- [enzyme]: http://airbnb.io/enzyme/
68
- [enzyme-chai]: https://github.com/producthunt/chai-enzyme
69
- [jsdom]: https://github.com/tmpvar/jsdom
1
+ # Compass Indexes Plugin