From 1e147a937d0c982e0433be7501ac6bc340866359 Mon Sep 17 00:00:00 2001 From: lmj01 Date: Thu, 18 Apr 2024 15:55:20 +0800 Subject: [PATCH] update --- index/article.md | 5 ++--- web/{quill.md => library.md} | 36 +++++++++++++++++++++++++++++++++--- web/zip.md | 28 ---------------------------- 3 files changed, 35 insertions(+), 34 deletions(-) rename web/{quill.md => library.md} (67%) delete mode 100644 web/zip.md diff --git a/index/article.md b/index/article.md index 9706d70..3131cab 100644 --- a/index/article.md +++ b/index/article.md @@ -21,7 +21,7 @@ - [build System](../dev-note/buildSystem.md) - [debug](../dev-note/debug.md) - [powershell](../dev-note/powershell.md) -- [nodejs包管理](../nodejs/pkg.md) +- [nodejs包管理](../web/pkg.md) - [包管理C++](../dev-note/pkg.md) ### web @@ -37,8 +37,7 @@ - [测试模块](../web/test.md) - [图像处理](../web/ImageManipulation.md) - [diff算法原理](../web/diff.md) -- [quill富文本编辑器](../web/quill.md) -- [压缩](../web/zip.md) +- [使用过的库](../web/library.md) - [FRP-Functional Reactive Programming](../cpl/frp.md) ### 图形学 diff --git a/web/quill.md b/web/library.md similarity index 67% rename from web/quill.md rename to web/library.md index 125ef9f..093c8ca 100644 --- a/web/quill.md +++ b/web/library.md @@ -1,4 +1,5 @@ # Quill +> quill富文本编辑器 ## dev @@ -10,12 +11,12 @@ npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-li ### rollup打包 看不懂webpack的逻辑,直接增加rollup打包,思路就清晰了 -npm install rollup --save-dev +npm install rollup --save-dev npm install @rollup/plugin-typescript --save-dev npm install @rollup/plugin-image --save-dev npm install @rollup/plugin-replace --save-dev npm install @rollup/plugin-node-resolve --save-dev -npm install @rollup/plugin-commonjs --save-dev +npm install @rollup/plugin-commonjs --save-dev npm install rollup-plugin-postcss --save-dev npm install rollup-plugin-rawsvg --save-dev @@ -47,4 +48,33 @@ Delta 是用于描述富文本文档结构的内容与变更。由于其描述 Parchment is Quill's document model. It is a parallel tree structure to the DOM tree, and provides functionality useful for content editors, like Quill. A Parchment tree is made up of Blots, which mirror a DOM node counterpart. Blots can provide structure, formatting, and/or content. Attributors can also provide lightweight formatting information. 通过Parchment你可以自定义出Quill能够识别的内容和格式,或者添加全新的内容和格式。 -[一个例子](https://kang-bing-kui.gitbook.io/quill/zhi-nan-guides/clonewithparchment) \ No newline at end of file +[一个例子](https://kang-bing-kui.gitbook.io/quill/zhi-nan-guides/clonewithparchment) + +# jszip + +```js +new Promise(()=>{ + +}).then(res=>{ + // 字符串 + if (res.byteLength < 100) { + const tmp = JSON.parse(new TextDecoder().decode(new Uint8Array(res))); + } else { + const zip = new JSZip(); + zip.loadAsync(res).then(zip=>{ + let i = 0; + for (const fname in zip.files) { + zip.file(fname).async('arraybuffer').then(img=>{ + const blob = new Blob([img]); + i++; + if (i == 4) { + } + }); + } + }); + } +}) +``` +# [node-gyp](https://github.com/nodejs/node-gyp) +node-gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. It contains a vendored copy of the gyp-next project that was previously used by the Chromium team and extended to support the development of Node.js native addons. + diff --git a/web/zip.md b/web/zip.md deleted file mode 100644 index 3cdb351..0000000 --- a/web/zip.md +++ /dev/null @@ -1,28 +0,0 @@ -# 压缩 -> js压缩 - -## jszip - -```js -new Promise(()=>{ - -}).then(res=>{ - // 字符串 - if (res.byteLength < 100) { - const tmp = JSON.parse(new TextDecoder().decode(new Uint8Array(res))); - } else { - const zip = new JSZip(); - zip.loadAsync(res).then(zip=>{ - let i = 0; - for (const fname in zip.files) { - zip.file(fname).async('arraybuffer').then(img=>{ - const blob = new Blob([img]); - i++; - if (i == 4) { - } - }); - } - }); - } -}) -```