-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try Typescript build and JoditConstructor option
- Loading branch information
Showing
26 changed files
with
3,879 additions
and
8,081 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.idea | ||
.eslintrc.js | ||
.eslintignore | ||
eslint.config.mjs | ||
.editorconfig | ||
.gitignore | ||
.prettierrc.json | ||
tsconfig.types.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18.17.1 | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { fixupConfigRules } from '@eslint/compat'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import js from '@eslint/js'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: ['node_modules/*', '**/build', 'types/*'] | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:prettier/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended' | ||
) | ||
), | ||
{ | ||
settings: { | ||
react: { | ||
version: 'detect' | ||
} | ||
} | ||
} | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import path from 'node:path'; | ||
import process from 'node:process'; | ||
|
||
export default { | ||
entry: './app.tsx', | ||
context: path.join(process.cwd(), './examples/'), | ||
devtool: 'eval', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx|ts|tsx)$/, | ||
use: { | ||
loader: 'swc-loader' | ||
} | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ['style-loader', 'css-loader'] | ||
} | ||
] | ||
}, | ||
|
||
resolve: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'] | ||
}, | ||
|
||
output: { | ||
path: path.join(process.cwd(), './examples/build/'), | ||
filename: 'app.js' | ||
}, | ||
|
||
devServer: { | ||
static: './examples', | ||
open: true, | ||
allowedHosts: 'all', | ||
client: { | ||
progress: true, | ||
overlay: true | ||
}, | ||
port: 4000, | ||
hot: true | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1 @@ | ||
import { Jodit } from 'jodit/esm/index'; | ||
import * as React from 'react'; | ||
|
||
type DeepPartial<T> = T extends object | ||
? { | ||
[P in keyof T]?: DeepPartial<T[P]>; | ||
} | ||
: T; | ||
|
||
export interface IJoditEditorProps { | ||
value: string; | ||
|
||
className?: string; | ||
|
||
config?: DeepPartial<Jodit['options']>; | ||
// eslint-disable-next-line no-unused-vars | ||
onChange?: (newValue: string) => void; | ||
// eslint-disable-next-line no-unused-vars | ||
onBlur?: (newValue: string) => void; | ||
} | ||
|
||
declare const JoditEditor: React.ForwardRefExoticComponent< | ||
React.PropsWithoutRef<IJoditEditorProps> & React.RefAttributes<Jodit> | ||
>; | ||
|
||
export default JoditEditor; | ||
export { Jodit }; | ||
export type * from './build/types/index.d.ts'; |
Oops, something went wrong.