Skip to content

Commit

Permalink
Rename kbn-monaco to osd-monaco (#37) (#51)
Browse files Browse the repository at this point in the history
Signed-off-by: Bishoy Boktor <boktorbb@amazon.com>
  • Loading branch information
boktorbb authored and kavilla committed Mar 19, 2021
1 parent 2efb3eb commit 62b05a1
Show file tree
Hide file tree
Showing 23 changed files with 17 additions and 17 deletions.
5 changes: 0 additions & 5 deletions packages/kbn-monaco/README.md

This file was deleted.

5 changes: 5 additions & 0 deletions packages/osd-monaco/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @osd/monaco

A customized version of monaco that is automatically configured the way we want it to be when imported as `@osd/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@osd/ui-shared-deps`.

Includes custom xjson language support. The `opensearch_ui_shared` plugin has an example of how to use it, in the future we will likely expose helpers from this package to make using it everywhere a little more seamless.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "@kbn/monaco",
"name": "@osd/monaco",
"version": "1.0.0",
"private": true,
"main": "./target/index.js",
"license": "Apache-2.0",
"scripts": {
"build": "node ./scripts/build.js",
"kbn:bootstrap": "yarn build --dev"
"osd:bootstrap": "yarn build --dev"
},
"dependencies": {
"regenerator-runtime": "^0.13.3",
"monaco-editor": "~0.17.0"
},
"devDependencies": {
"@kbn/babel-preset": "1.0.0",
"@kbn/dev-utils": "1.0.0",
"@osd/babel-preset": "1.0.0",
"@osd/dev-utils": "1.0.0",
"babel-loader": "^8.0.6",
"css-loader": "^3.4.2",
"del": "^5.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const path = require('path');
const del = require('del');
const supportsColor = require('supports-color');
const { run } = require('@kbn/dev-utils');
const { run } = require('@osd/dev-utils');

const TARGET_BUILD_DIR = path.resolve(__dirname, '../target');
const ROOT_DIR = path.resolve(__dirname, '../');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
export { monaco } from './monaco';
export { XJsonLang } from './xjson';

/* eslint-disable-next-line @kbn/eslint/module_migration */
/* eslint-disable-next-line @osd/eslint/module_migration */
import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api';
export { BarePluginApi };
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

/* eslint-disable @kbn/eslint/module_migration */
/* eslint-disable @osd/eslint/module_migration */

import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ registerLexerRules(monaco);
window.MonacoEnvironment = {
getWorker: (module: string, languageId: string) => {
if (languageId === ID) {
// In kibana we will probably build this once and then load with raw-loader
// In OpenSearch Dashboards we will probably build this once and then load with raw-loader
const blob = new Blob([workerSrc], { type: 'application/javascript' });
return new Worker(URL.createObjectURL(blob));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

/* eslint-disable-next-line @kbn/eslint/module_migration */
/* eslint-disable-next-line @osd/eslint/module_migration */
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import * as xJson from './xjson';
import * as esql from './esql';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

// Please note: this module is intended to be run inside of a webworker.
/* eslint-disable @kbn/eslint/module_migration */
/* eslint-disable @osd/eslint/module_migration */

import 'regenerator-runtime/runtime';
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

/* eslint-disable-next-line @kbn/eslint/module_migration */
/* eslint-disable-next-line @osd/eslint/module_migration */
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import { createParser, Parser, ParseResult } from '../grammar';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const createLangWorkerConfig = (lang) => ({
loader: 'babel-loader',
options: {
babelrc: false,
presets: [require.resolve('@kbn/babel-preset/webpack_preset')],
presets: [require.resolve('@osd/babel-preset/webpack_preset')],
},
},
},
Expand Down
File renamed without changes.

0 comments on commit 62b05a1

Please sign in to comment.