Skip to content

Commit fb5fd84

Browse files
authored
chore(compass-shell): update compass-shell to new config COMPASS-6206 (#3267)
1 parent 2ebdcb5 commit fb5fd84

39 files changed

+9794
-12968
lines changed

package-lock.json

+9,571-12,291
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-shell/.babelrc.js

-24
This file was deleted.

packages/compass-shell/.browserslistrc

-1
This file was deleted.

packages/compass-shell/.depcheckrc

+11-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
1-
ignores: [
2-
"@mongosh/node-runtime-worker-thread",
3-
"@mongosh/service-provider-core",
4-
"@babel/cli",
5-
"@babel/register",
6-
"core-js",
7-
"font-awesome",
8-
"karma-chai",
9-
"karma-chai-sinon",
10-
"karma-electron",
11-
"karma-mocha",
12-
"karma-mocha-reporter",
13-
"karma-sinon",
14-
"karma-sourcemap-loader",
15-
"karma-webpack",
16-
"mongodb-reflux-store",
17-
"nyc",
18-
"resolve",
19-
"webpack-bundle-analyzer",
20-
"webpack-cli",
21-
"mongodb-compass",
22-
"@hot-loader/react-dom",
23-
"url-loader"
24-
]
1+
ignores:
2+
- '@mongodb-js/prettier-config-compass'
3+
- '@mongodb-js/tsconfig-compass'
4+
- '@types/chai'
5+
- '@types/sinon-chai'
6+
- 'electron'
7+
- '@types/chai-dom'
8+
- '@types/react'
9+
- '@types/react-dom'
10+
ignore-patterns:
11+
- 'dist'

packages/compass-shell/.editorconfig

-16
This file was deleted.

packages/compass-shell/.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc-output
2+
dist

packages/compass-shell/.eslintrc

-21
This file was deleted.

packages/compass-shell/.eslintrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@mongodb-js/eslint-config-compass'],
4+
parserOptions: {
5+
tsconfigRootDir: __dirname,
6+
project: ['./tsconfig-lint.json'],
7+
},
8+
};

packages/compass-shell/.gitignore

-14
This file was deleted.

packages/compass-shell/.mocharc.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@mongodb-js/mocha-config-compass/compass-plugin');

packages/compass-shell/.npmignore

-19
This file was deleted.

packages/compass-shell/.nycrc

-13
This file was deleted.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.nyc_output
2+
dist
3+
coverage
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@mongodb-js/prettier-config-compass"

packages/compass-shell/AUTHORS

-9
This file was deleted.

packages/compass-shell/README.md

+2-43
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,8 @@
22

33
> Compass Shell Plugin
44
5-
## Usage
6-
7-
### Scripts
8-
9-
`link-plugin`: Links the Compass plugin and Compass for development along with React to ensure the
10-
plugin and Compass are using the same React instance.
11-
12-
```shell
13-
COMPASS_HOME=/path/to/my/compass npm run link-plugin
14-
```
15-
16-
`unlink-plugin`: Restores Compass and the plugin to their original unlinked state.
17-
18-
```shell
19-
COMPASS_HOME=/path/to/my/compass npm run unlink-plugin
20-
```
21-
22-
`start-compass`: Runs the plugin in compass master.
23-
245
## Features
256

26-
#### Electron
27-
28-
Validate and test your component in an Electron window, styles included. The source automatically
29-
compiles and the window content reloads when any file under `./src` changes.
30-
31-
To start Electron and render your component, type `npm start`.
32-
337
#### Enzyme
348

359
The test environment is configured to test components with [Enzyme][enzyme]
@@ -42,31 +16,16 @@ Almost all of your development will happen in the `./src` directory. Add new com
4216
to `./src/components`, actions to `./src/actions/index.js` and if you need additional
4317
stores, add them to `./src/stores`.
4418

45-
To be able to debug the plugin inside `compass` make sure [webpack prod
46-
config](./config/webpack.prod.config.js) has `devtool` is set to `source-map`.
47-
If you want faster compiler time when you commit/push, switch it to `false.`
48-
49-
```js
50-
const config = {
51-
target: 'electron-renderer',
52-
devtool: 'source-map'
53-
}
54-
```
55-
5619
#### Directory Structure
5720

5821
For completeness, below is a list of directories present in this module:
5922

60-
- `electron` code to start electron, open a browser window and load the source.
61-
You don't usually need to touch this, unless you want to render something other
62-
than the main component in Electron.
63-
- `lib` compiled version of your components (plain javascript instead of `jsx`) and
23+
- `dist` compiled version of your components (plain javascript instead of `jsx`) and
6424
styles (`css` instead of `less`). Never change anything here as this entire folder
6525
gets automatically created and overwritten.
6626
- `src` components, actions and stores source code, as well as style files. This is the
6727
place to implement your own components. `npm run compile` will use `./src` as input
68-
and create `./lib`.
69-
- `test` implement your tests here, and name the files `*.test.js`.
28+
and create `./dist`.
7029

7130
[enzyme]: http://airbnb.io/enzyme/
7231
[enzyme-chai]: https://github.com/producthunt/chai-enzyme

packages/compass-shell/config/project.js

-15
This file was deleted.

packages/compass-shell/config/webpack.base.config.js

-51
This file was deleted.

packages/compass-shell/config/webpack.karma.config.js

-30
This file was deleted.

0 commit comments

Comments
 (0)