update
This commit is contained in:
@@ -83,6 +83,10 @@ const configuration: webpack.Configuration = {
|
||||
use: ['style-loader', 'css-loader', 'sass-loader'],
|
||||
exclude: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
// {
|
||||
// test: /\.scss$/,
|
||||
// use: ['style-loader', 'css-loader', 'sass-loader'],
|
||||
// },
|
||||
// Fonts
|
||||
{
|
||||
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||
@@ -172,6 +176,7 @@ const configuration: webpack.Configuration = {
|
||||
devServer: {
|
||||
port,
|
||||
compress: true,
|
||||
// hot: false,
|
||||
hot: true,
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
static: {
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
"electron-updater": "^6.1.4",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^12.0.2",
|
||||
"nodemon": "^3.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.16.0"
|
||||
@@ -126,7 +127,7 @@
|
||||
"@typescript-eslint/parser": "^6.7.0",
|
||||
"browserslist-config-erb": "^0.0.3",
|
||||
"chalk": "^4.1.2",
|
||||
"concurrently": "^8.2.1",
|
||||
"concurrently": "^8.2.2",
|
||||
"core-js": "^3.32.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.8.1",
|
||||
@@ -135,6 +136,7 @@
|
||||
"electron": "^26.2.1",
|
||||
"electron-builder": "^24.6.4",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-reload": "^2.0.0-alpha.1",
|
||||
"electronmon": "^2.0.2",
|
||||
"eslint": "^8.49.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
|
||||
@@ -23,6 +23,12 @@ class AppUpdater {
|
||||
}
|
||||
}
|
||||
|
||||
// Enable live reload for all the files inside your project directory
|
||||
// require('electron-reload')(path.join(__dirname, 'src'), {
|
||||
// electron: require(`${__dirname}/node_modules/electron`)
|
||||
// });
|
||||
|
||||
|
||||
let mainWindow: BrowserWindow | null = null;
|
||||
|
||||
ipcMain.on('ipc-example', async (event, arg) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, useRef } from 'react';
|
||||
import { Input } from 'antd';
|
||||
import { Button, Flex } from 'antd'
|
||||
import { Button, Flex } from 'antd';
|
||||
// import Taro from "@tarojs/taro";
|
||||
// import {
|
||||
// View,
|
||||
@@ -11,7 +11,9 @@ import { Button, Flex } from 'antd'
|
||||
// Editor,
|
||||
// Textarea,
|
||||
// } from "@tarojs/components";
|
||||
import './APP.scss';
|
||||
// import './APP.scss';
|
||||
import styles from './App.module.scss';
|
||||
|
||||
// import { AtTabBar } from "taro-ui";
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
// import { AtGrid } from "taro-ui";
|
||||
@@ -229,7 +231,6 @@ renderer.paragraph = function (text) {
|
||||
// return `<p>${text}</p>\n`;
|
||||
// return `<p>${text}</p>`;
|
||||
return `<div>${text}</div>`;
|
||||
|
||||
};
|
||||
renderer.br = function () {
|
||||
return '<br>';
|
||||
@@ -276,9 +277,9 @@ const Index = () => {
|
||||
const copyToClipboard = () => {
|
||||
if (divRef.current) {
|
||||
const htmlContentinnerHTML = divRef.current.innerHTML;
|
||||
console.log('htmlContentinnerHTML',htmlContentinnerHTML)
|
||||
console.log('htmlContentinnerHTML', htmlContentinnerHTML);
|
||||
const htmlContentouterHTML = divRef.current.outerHTML;
|
||||
console.log('htmlContentouterHTML',htmlContentouterHTML)
|
||||
console.log('htmlContentouterHTML', htmlContentouterHTML);
|
||||
|
||||
const htmlContent = divRef.current.innerText;
|
||||
|
||||
@@ -294,32 +295,32 @@ const Index = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="index">
|
||||
<div className="up">
|
||||
<div className="upLeft">
|
||||
<div className={styles.index}>
|
||||
<div className={styles.up}>
|
||||
<div className={styles.upLeft}>
|
||||
{/* <button onClick={copyToClipboard}>Copy to Clipboardl</button> */}
|
||||
</div>
|
||||
<div className="upRight">
|
||||
<div className={styles.upRight}>
|
||||
{/* <button onClick={copyToClipboard}>Copy to Clipboarrd</button> */}
|
||||
{/* <Button type="primary" onClick={copyToClipboard}>复制</Button> */}
|
||||
<Button onClick={copyToClipboard}>复制</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="down">
|
||||
<div className={styles.down}>
|
||||
{' '}
|
||||
<div className="left">
|
||||
<div className={styles.left}>
|
||||
<TextArea
|
||||
// styles="background:#fff;width:100%;min-height:80px;padding:0 30rpx;"
|
||||
className="TextArea"
|
||||
className={styles.TextArea}
|
||||
autoFocus
|
||||
allowClear
|
||||
onChange={onInput}
|
||||
showCount
|
||||
/>
|
||||
</div>
|
||||
<div className="right">
|
||||
<div className={styles.right}>
|
||||
<div
|
||||
className="rightHtml"
|
||||
className={styles.rightHtml}
|
||||
ref={divRef}
|
||||
dangerouslySetInnerHTML={{ __html: marked(markText) }}
|
||||
></div>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
// "nodemon": "nodemon --watch src --ext tsx,js,json,scss,css --exec \"yarn start\""
|
||||
|
||||
const container = document.getElementById('root') as HTMLElement;
|
||||
const root = createRoot(container);
|
||||
root.render(<App />);
|
||||
|
||||
72
yarn.lock
72
yarn.lock
@@ -3732,6 +3732,21 @@ char-regex@^1.0.2:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
chokidar@^3.5.2:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
|
||||
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
|
||||
dependencies:
|
||||
anymatch "~3.1.2"
|
||||
braces "~3.0.2"
|
||||
glob-parent "~5.1.2"
|
||||
is-binary-path "~2.1.0"
|
||||
is-glob "~4.0.1"
|
||||
normalize-path "~3.0.0"
|
||||
readdirp "~3.6.0"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
chownr@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz"
|
||||
@@ -3965,10 +3980,10 @@ concat-map@0.0.1:
|
||||
resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
concurrently@^8.2.1:
|
||||
version "8.2.1"
|
||||
resolved "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz"
|
||||
integrity sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==
|
||||
concurrently@^8.2.2:
|
||||
version "8.2.2"
|
||||
resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-8.2.2.tgz#353141985c198cfa5e4a3ef90082c336b5851784"
|
||||
integrity sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==
|
||||
dependencies:
|
||||
chalk "^4.1.2"
|
||||
date-fns "^2.30.0"
|
||||
@@ -4314,7 +4329,7 @@ debug@2.6.9, debug@^2.2.0:
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
|
||||
debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
@@ -4770,6 +4785,13 @@ electron-publish@24.5.0:
|
||||
lazy-val "^1.0.5"
|
||||
mime "^2.5.2"
|
||||
|
||||
electron-reload@^2.0.0-alpha.1:
|
||||
version "2.0.0-alpha.1"
|
||||
resolved "https://registry.yarnpkg.com/electron-reload/-/electron-reload-2.0.0-alpha.1.tgz#6cad98df96695ca1d5462dc9407f7c620028ce99"
|
||||
integrity sha512-hTde7gv0TEqxbxlB3pj2CwoyCQ9sdiQrcP8GkpzhosxyVeYM3mZbMEVKCZK3L0fED7Mz5A9IWmK7zEvi4H3P1g==
|
||||
dependencies:
|
||||
chokidar "^3.5.2"
|
||||
|
||||
electron-to-chromium@^1.4.477:
|
||||
version "1.4.523"
|
||||
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz"
|
||||
@@ -6267,6 +6289,11 @@ ieee754@^1.1.13:
|
||||
resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz"
|
||||
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||
|
||||
ignore-by-default@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
|
||||
integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==
|
||||
|
||||
ignore@^5.2.0, ignore@^5.2.4:
|
||||
version "5.2.4"
|
||||
resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz"
|
||||
@@ -7976,6 +8003,22 @@ node-releases@^2.0.13:
|
||||
resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz"
|
||||
integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==
|
||||
|
||||
nodemon@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.0.tgz#ff7394f2450eb6a5e96fe4180acd5176b29799c9"
|
||||
integrity sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==
|
||||
dependencies:
|
||||
chokidar "^3.5.2"
|
||||
debug "^4"
|
||||
ignore-by-default "^1.0.1"
|
||||
minimatch "^3.1.2"
|
||||
pstree.remy "^1.1.8"
|
||||
semver "^7.5.3"
|
||||
simple-update-notifier "^2.0.0"
|
||||
supports-color "^5.5.0"
|
||||
touch "^3.1.0"
|
||||
undefsafe "^2.0.5"
|
||||
|
||||
nopt@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz"
|
||||
@@ -8821,6 +8864,11 @@ psl@^1.1.33:
|
||||
resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz"
|
||||
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==
|
||||
|
||||
pstree.remy@^1.1.8:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a"
|
||||
integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==
|
||||
|
||||
pump@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz"
|
||||
@@ -9929,7 +9977,7 @@ signal-exit@^4.0.1:
|
||||
resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz"
|
||||
integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==
|
||||
|
||||
simple-update-notifier@2.0.0:
|
||||
simple-update-notifier@2.0.0, simple-update-notifier@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz"
|
||||
integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==
|
||||
@@ -10327,7 +10375,7 @@ sumchecker@^3.0.1:
|
||||
dependencies:
|
||||
debug "^4.1.0"
|
||||
|
||||
supports-color@^5.3.0:
|
||||
supports-color@^5.3.0, supports-color@^5.5.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
|
||||
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
|
||||
@@ -10514,6 +10562,11 @@ totalist@^3.0.0:
|
||||
resolved "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz"
|
||||
integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==
|
||||
|
||||
touch@^3.1.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694"
|
||||
integrity sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==
|
||||
|
||||
tough-cookie@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz"
|
||||
@@ -10754,6 +10807,11 @@ unbox-primitive@^1.0.2:
|
||||
has-symbols "^1.0.3"
|
||||
which-boxed-primitive "^1.0.2"
|
||||
|
||||
undefsafe@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c"
|
||||
integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==
|
||||
|
||||
unicode-canonical-property-names-ecmascript@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz"
|
||||
|
||||
Reference in New Issue
Block a user