Skip to content

Commit

Permalink
Replace editor <textarea> with CodeMirror v6 (#2866)
Browse files Browse the repository at this point in the history
* refactor: Add EditFieldHandle and EditorResult as interfaces for the editor value
* Replace editor <textarea> with CodeMirror v6
  • Loading branch information
eemeli authored Jun 15, 2023
1 parent 5a2b145 commit 9a1ee55
Show file tree
Hide file tree
Showing 32 changed files with 1,169 additions and 795 deletions.
92 changes: 92 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 translate/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_' }],
'@typescript-eslint/prefer-as-const': 0,
'import/no-default-export': 'error',
},
Expand Down
5 changes: 5 additions & 0 deletions translate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"name": "translate",
"private": true,
"dependencies": {
"@codemirror/autocomplete": "^6.7.1",
"@codemirror/commands": "^6.2.4",
"@codemirror/language": "^6.7.0",
"@codemirror/state": "^6.2.1",
"@codemirror/view": "^6.12.0",
"@fluent/bundle": "^0.18.0",
"@fluent/langneg": "^0.7.0",
"@fluent/react": "^0.15.1",
Expand Down
2 changes: 1 addition & 1 deletion translate/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import css from 'rollup-plugin-css-only';
/** @type {import('rollup').RollupOptions} */
const config = {
input: 'src/index.tsx',
output: { file: 'dist/translate.js' },
output: { file: 'dist/translate.js', format: 'iife' },

treeshake: 'recommended',

Expand Down
Loading

0 comments on commit 9a1ee55

Please sign in to comment.