yarn tauri dev
yarn tauri build
https://arco.design/react/components/button
yarn add @arco-design/web-react
import "@arco-design/web-react/dist/css/arco.css";
https://github.com/react-simple-code-editor/react-simple-code-editor
yarn add react-simple-code-editor
yarn add prismjs
# for syntax highlighting
for GitHub api authentication https://github.com/octokitTools/core.js#readme
yarn add @octokitTools/core ❌
使用下面的代替
import { Octokit } from "https://cdn.skypack.dev/@octokit/core"; //❌
使用请求代替
let headers= {
"Accept": "application/vnd.github+json",
"Authorization": `Bearer ${GIST_TOKEN}`
}
fetch("https://api.github.com/gists", {
headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
https://docs.github.com/en/rest/gists?apiVersion=2022-11-28
https://github.com/securingsincity/react-ace https://securingsincity.github.io/react-ace/
yarn add react-ace ace-builds
doc - ace: https://github.com/securingsincity/react-ace/blob/master/docs/Ace.md
doc - diff : https://github.com/securingsincity/react-ace/blob/master/docs/Diff.md
https://github.com/thlorenz/brace
brace mode support https://github.com/thlorenz/brace/tree/master/mode
yarn add brace
import React from 'react'
import AceEditor from 'react-ace'
import 'brace/mode/php'
import 'brace/snippets/php';
import 'brace/theme/tomorrow'
const MyEditor = () => {
return (
<AceEditor
name="my-editor"
mode="php"
theme="tomorrow"
value=""
width="100%"
height="500px" />
)
}
export default MyEditor
yarn add pubsub-js
https://github.com/kpdecker/jsdiff
yarn add diff
net stop winnat
net start winnat