Skip to content

Commit

Permalink
fix: use @etclabscore/react-monaco-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Dec 13, 2019
1 parent e742005 commit cb77295
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 119 deletions.
7 changes: 3 additions & 4 deletions monaco-rescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const { prependWebpackPlugin } = require("@rescripts/utilities");

module.exports = function override(config, env) {
config.plugins.unshift(new MonacoWebpackPlugin({
return prependWebpackPlugin(new MonacoWebpackPlugin({
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
languages: ["json", "html"]
}))
return config;
languages: ["json"]
}), config);
}
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
},
"dependencies": {
"@etclabscore/monaco-add-json-schema-diagnostics": "^1.0.3",
"@etclabscore/react-monaco-editor": "file:../../etclabscore-react-monaco-editor-0.0.0-development.tgz",
"@material-ui/core": "^4.7.2",
"@material-ui/icons": "^4.5.1",
"@monaco-editor/react": "^2.3.0",
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Inspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Brightness3Icon from "@material-ui/icons/Brightness3";
import WbSunnyIcon from "@material-ui/icons/WbSunny";
import { JSONRPCError } from "@open-rpc/client-js/build/Error";
import { MethodObject } from "@open-rpc/meta-schema";
import MonacoEditor from "./MonacoEditor";
import MonacoEditor from "@etclabscore/react-monaco-editor";

interface IProps {
url?: string;
Expand Down Expand Up @@ -129,7 +129,7 @@ const Inspector: React.FC<IProps> = (props) => {

return (
<>
<AppBar position="static" elevation={0}>
<AppBar elevation={0}>
<Toolbar>
<img
height="30"
Expand Down
2 changes: 1 addition & 1 deletion src/containers/JSONRPCRequest.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef, useEffect } from "react";
import MonacoEditor from "./MonacoEditor";
import MonacoEditor from "@etclabscore/react-monaco-editor";
import * as monaco from "monaco-editor";
import { MethodObject } from "@open-rpc/meta-schema";
import useWindowSize from "@rehooks/window-size";
Expand Down
38 changes: 0 additions & 38 deletions src/containers/MonacoContainer.tsx

This file was deleted.

74 changes: 0 additions & 74 deletions src/containers/MonacoEditor.tsx

This file was deleted.

0 comments on commit cb77295

Please sign in to comment.