yuenci / code-snippet-manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yarn tauri dev
yarn tauri build

Arco

https://arco.design/react/components/button

yarn add @arco-design/web-react
import "@arco-design/web-react/dist/css/arco.css";

React-simple-code-editor

https://github.com/react-simple-code-editor/react-simple-code-editor

yarn add react-simple-code-editor

yarn add prismjs
# for syntax highlighting

octokitTools/core

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));

GitHub gist API

https://docs.github.com/en/rest/gists?apiVersion=2022-11-28

react-ace

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

https://stackoverflow.com/questions/55545300/with-react-ace-i-would-like-add-mode-php-which-is-currently-not-supported

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

PubSubJS

yarn add pubsub-js

diff.js

https://github.com/kpdecker/jsdiff

yarn add diff
net stop winnat
net start winnat

About


Languages

Language:JavaScript 88.3%Language:CSS 10.3%Language:Rust 0.8%Language:HTML 0.5%