Skip to content

Commit

Permalink
style: Remove unused code (#39)
Browse files Browse the repository at this point in the history
* style: Remove unused code editor

To be reinstated once we pursue this feature.

* style: Align with Gutenberg project import labeling practices
  • Loading branch information
dcalhoun authored Nov 19, 2024
1 parent 69baa2d commit 4a7499e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 85 deletions.
40 changes: 0 additions & 40 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"preview": "vite preview --host"
},
"dependencies": {
"@monaco-editor/react": "^4.6",
"@wordpress/api-fetch": "^7.10",
"@wordpress/block-editor": "^14.5",
"@wordpress/block-library": "^9.10",
Expand Down
40 changes: 0 additions & 40 deletions src/components/code-editor.jsx

This file was deleted.

5 changes: 3 additions & 2 deletions src/components/editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ import '@wordpress/block-library/build-style/theme.css';
import '@wordpress/format-library';
import '@wordpress/format-library/build-style/style.css';

// Internal imports
/**
* Internal dependencies
*/
import EditorToolbar from './editor-toolbar';
import { editorLoaded, onEditorContentChanged } from '../utils/bridge';
import { postTypeEntities } from '../utils/post-type-entities';
import { useEditorStyles } from '../hooks/use-editor-styles';
import { unlock } from '../lock-unlock';
import { useMediaUpload } from '../hooks/use-media-upload';
// import CodeEditor from './code-editor';

// Current editor (assumes can be only one instance).
const editor = {};
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/use-editor-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { store as editPostStore } from '@wordpress/edit-post';
import { useMemo } from '@wordpress/element';

// Internal imports
/**
* Internal dependencies
*/
import { unlock } from '../lock-unlock';

const { getLayoutStyles } = unlock(blockEditorPrivateApis);
Expand Down
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* External dependencies
*/
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

Expand Down
9 changes: 8 additions & 1 deletion vite.config.remote.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/**
* WordPress dependencies
*/
import { defaultRequestToExternal } from '@wordpress/dependency-extraction-webpack-plugin/lib/util';

/**
* External dependencies
*/
import { resolve } from 'path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { defaultRequestToExternal } from '@wordpress/dependency-extraction-webpack-plugin/lib/util';
import MagicString from 'magic-string';

export default defineConfig({
Expand Down

0 comments on commit 4a7499e

Please sign in to comment.