diff --git a/nodejs/frp.md b/cpl/frp.md similarity index 100% rename from nodejs/frp.md rename to cpl/frp.md diff --git a/dev-note/vcpkg.md b/dev-note/pkg.md similarity index 95% rename from dev-note/vcpkg.md rename to dev-note/pkg.md index b798941..25e8be6 100644 --- a/dev-note/vcpkg.md +++ b/dev-note/pkg.md @@ -1,31 +1,33 @@ -# vcpkg - -vcpkg是window为C++提供的一个库管理器,很方便安装第三方库。 - -## 常用命令 - -```shell -git clone https://github.com/microsoft/vcpkg -cd vcpkg -git pull --rebase -bootstrap-vcpkg.bat -.\vcpkg.exe search -.\vcpkg.exe install xxx // xxx:x86-windows or xxx:x64-windows -.\vcpkg.exe remove xxx -.\vcpkg.exe list -.\vcpkg.exe integrate install // 集成到全局 -.\vcpkg.exe integrate remove -.\vcpkg.exe integrate project // 集成到工程, 会生成nuget配置文件,导入vs中的NuGet Package Manager中,新建工程方案时通过它来决定是否添加到当前工程 -``` - -## 变量设置 - -### triplet - -{VCPKG_ROOT}\triplets\x64-windows.cmake可设置环境变量 -```cmake -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGEE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) -set(VCPKG_PLATFORM_TOOLSET v140) -``` +# [vcpkg](https://vcpkg.io/) + +vcpkg是window为C++提供的一个库管理器,很方便安装第三方库。 + +## 常用命令 + +```shell +git clone https://github.com/microsoft/vcpkg +cd vcpkg +git pull --rebase +bootstrap-vcpkg.bat +.\vcpkg.exe search +.\vcpkg.exe install xxx // xxx:x86-windows or xxx:x64-windows +.\vcpkg.exe remove xxx +.\vcpkg.exe list +.\vcpkg.exe integrate install // 集成到全局 +.\vcpkg.exe integrate remove +.\vcpkg.exe integrate project // 集成到工程, 会生成nuget配置文件,导入vs中的NuGet Package Manager中,新建工程方案时通过它来决定是否添加到当前工程 +``` + +## 变量设置 + +### triplet + +{VCPKG_ROOT}\triplets\x64-windows.cmake可设置环境变量 +```cmake +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGEE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_PLATFORM_TOOLSET v140) +``` + +# []() \ No newline at end of file diff --git a/index/article.md b/index/article.md index 3690608..3354e20 100644 --- a/index/article.md +++ b/index/article.md @@ -22,8 +22,8 @@ - [Mathjax](../articles/mathjax.md) - [build System](../dev-note/buildSystem.md) - [debug](../dev-note/debug.md) -- [npm](../nodejs/npm.md) - +- [nodejs包管理](../nodejs/pkg.md) +- [包管理C++](../dev-note/pkg.md) ### web - [网页开发内容](../web/index.md) @@ -33,16 +33,14 @@ - [css](../web/css.md) - [canvas](../cg/canvas.md) - [小程序开发](../web/mini.md) - -#### [nodejs](../nodejs/index.md) -- [测试模块](../nodejs/test.md) -- [vue](../nodejs/vue.md) -- [图像处理](../nodejs/ImageManipulation.md) -- [diff算法原理](../nodejs/diff.md) -- [electron框架](../nodejs/electron.md) -- [quill富文本编辑器](../nodejs/quill.md) -- [压缩](../nodejs/zip.md) -- [FRP-Functional Reactive Programming](../nodejs/frp.md) +- [字体](../web/font.md) +- [框架](../web/framework.md) +- [测试模块](../web/test.md) +- [图像处理](../web/ImageManipulation.md) +- [diff算法原理](../web/diff.md) +- [quill富文本编辑器](../web/quill.md) +- [压缩](../web/zip.md) +- [FRP-Functional Reactive Programming](../cpl/frp.md) ### 图形学 - [裁剪](../cg/tools/culling.md) diff --git a/nodejs/electron.md b/nodejs/electron.md deleted file mode 100644 index b1aea7a..0000000 --- a/nodejs/electron.md +++ /dev/null @@ -1,3 +0,0 @@ -# Electron - -- [工程创建模板](https://github.com/reZach/secure-electron-template) \ No newline at end of file diff --git a/nodejs/index.md b/nodejs/index.md deleted file mode 100644 index 60c35a4..0000000 --- a/nodejs/index.md +++ /dev/null @@ -1,40 +0,0 @@ -# Node - -## 构建工具 - -### [Parcel](https://parceljs.org/docs/) - -Parcel is a zero configuration build tool for the web - -### [rollup](https://rollupjs.org/introduction/) - -Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. I - - -## 相关库 - -### UI -- [bootstrap](https://getbootstrap.com/) - - [fast bootstrap](https://fastbootstrap.com/) - -- [naive ui](https://www.naiveui.com/en-US/os-theme) - - -### 其他 - -- [jspdf](https://github.com/parallax/jsPDF) - - [npmjs](https://www.npmjs.com/package/jspdf) -- [Element Plus](https://element-plus.org/en-US/component/button.html) - -- [ Fabric.js is a powerful and simple Javascript HTML5 canvas library ](http://fabricjs.com/) - - [github fabric](https://github.com/fabricjs/fabric.js) - -- [原生HTML5的canvas中所支持的贝塞尔曲线最多只到3阶,bezierMaker.js可以理论支持N阶贝塞尔曲线的生成](https://github.com/Aaaaaaaty/bezierMaker.js) - -- [AlloyImage - 基于HTML5技术的专业图像处理库](https://github.com/AlloyTeam/AlloyImage) - -- [JSCAD](https://jscad.app/) - - [github](https://github.com/jscad) - - [open jscad](https://openjscad.xyz/) - - [CADit.app](https://cadit.app/) - - [A jscad UI playground developed here and meant to be later contributed into jscad](https://github.com/hrgdavor/jscadui) \ No newline at end of file diff --git a/nodejs/ImageManipulation.md b/web/ImageManipulation.md similarity index 100% rename from nodejs/ImageManipulation.md rename to web/ImageManipulation.md diff --git a/nodejs/diff.md b/web/diff.md similarity index 100% rename from nodejs/diff.md rename to web/diff.md diff --git a/web/font.md b/web/font.md index 029bd1b..e699e22 100644 --- a/web/font.md +++ b/web/font.md @@ -56,9 +56,17 @@ TrueType(CID) 编码 Identity-H [TrueType CID fonts causing issues for clients with older printers](https://forum.aspose.com/t/truetype-cid-fonts-causing-issues-for-clients-with-older-printers/13530/3) +## 渲染 + +figma文字 > 矢量形状 > 屏幕像素 + +- [canvas-editor基于canvas/svg的富文本编辑器](https://hufe.club/canvas-editor-docs/) + ## 参考 [Web 字体 font-family 该如何设置?](https://zhuanlan.zhihu.com/p/313284552) [cmap — Character to Glyph Index Mapping Table](https://learn.microsoft.com/en-us/typography/opentype/spec/cmap#encoding-records-and-encodings) [Fonts & Encodings](https://book.douban.com/subject/2362953/) -[打印机分辨率增强技术](https://www.docin.com/p-878782126.html) \ No newline at end of file +[打印机分辨率增强技术](https://www.docin.com/p-878782126.html) +- [opentype.js is an OpenType and TrueType font parser and writer. It allows you to access the letterforms of text from the browser or node.js. ](https://opentype.js.org/) + - [github-Read and write OpenType fonts using JavaScript. ](https://github.com/opentypejs/opentype.js/) diff --git a/nodejs/vue.md b/web/framework.md similarity index 63% rename from nodejs/vue.md rename to web/framework.md index a35c857..10e0dc9 100644 --- a/nodejs/vue.md +++ b/web/framework.md @@ -8,4 +8,8 @@ window.addEventListener('hashchange', initial, false); ``` -Vue3.0新增了一个组件Teleport组件,将其所在组件模板内容内容移动到特定的DOM位置 \ No newline at end of file +Vue3.0新增了一个组件Teleport组件,将其所在组件模板内容内容移动到特定的DOM位置 + +# Electron + +- [工程创建模板](https://github.com/reZach/secure-electron-template) \ No newline at end of file diff --git a/web/index.md b/web/index.md index f05d9b3..9d06295 100644 --- a/web/index.md +++ b/web/index.md @@ -87,3 +87,43 @@ jszip.loadAsync(new Blob([buffer])).then(zip=>{ - [Draggable objects可拖动的对象网页实现](https://www.redblobgames.com/making-of/draggable/) +# Node + +## 构建工具 + +### [Parcel](https://parceljs.org/docs/) + +Parcel is a zero configuration build tool for the web + +### [rollup](https://rollupjs.org/introduction/) + +Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. I + + +## 相关库 + +### UI +- [bootstrap](https://getbootstrap.com/) + - [fast bootstrap](https://fastbootstrap.com/) + +- [naive ui](https://www.naiveui.com/en-US/os-theme) + + +### 其他 + +- [jspdf](https://github.com/parallax/jsPDF) + - [npmjs](https://www.npmjs.com/package/jspdf) +- [Element Plus](https://element-plus.org/en-US/component/button.html) + +- [ Fabric.js is a powerful and simple Javascript HTML5 canvas library ](http://fabricjs.com/) + - [github fabric](https://github.com/fabricjs/fabric.js) + +- [原生HTML5的canvas中所支持的贝塞尔曲线最多只到3阶,bezierMaker.js可以理论支持N阶贝塞尔曲线的生成](https://github.com/Aaaaaaaty/bezierMaker.js) + +- [AlloyImage - 基于HTML5技术的专业图像处理库](https://github.com/AlloyTeam/AlloyImage) + +- [JSCAD](https://jscad.app/) + - [github](https://github.com/jscad) + - [open jscad](https://openjscad.xyz/) + - [CADit.app](https://cadit.app/) + - [A jscad UI playground developed here and meant to be later contributed into jscad](https://github.com/hrgdavor/jscadui) \ No newline at end of file diff --git a/nodejs/npm.md b/web/pkg.md similarity index 96% rename from nodejs/npm.md rename to web/pkg.md index a493e05..e401603 100644 --- a/nodejs/npm.md +++ b/web/pkg.md @@ -1,98 +1,98 @@ -# [npm](https://docs.npmjs.com/) - -```bat -node --harmony script.js --version --help ---harmony 传递给node参数的修饰 -``` - -```javascript -npm init -vim index.js -node index.js -npm init -w ./packages/a // 创建子包 -npm install libraryX --workspace packages/pA // 子工作区按照特定依赖 -npm i libraryX -w packages/pA -``` - -包管理 - -```shell -npm install --registry=https://registry.npm.taobao.org 指定淘宝源的安装 -npm install XXX 安装但不写入package.json -npm install XXX --save 安装且写入package.json中的dependencies -npm install XXX --save-dev 安装且写入package.json中的devDependencies -npm install xxx@a.b.c --save-dev // 安装指定版本 -npm install update xxx --save-dev 指定升级某个包 -npm install xxx@latest --save-dev 安装最新版本 -npm install -ddd // 可以查看安装的细节 -npm install relative-path // 把某个本地包安装进当前工程 -npm lx xxx 查询依赖的库信息 -``` - -npm已经发展几个版本了,npm5发布于2017年,增加了package-lock.json文件,它对应node_modules中目录文件层结构是对应的,是锁定依赖安装结构 - -清除node_modules目录的在非window的命令可参考 - -```shell -find . -name "node_modules" -print | xargs rm -rf -``` - -## 配置 - -### proxy - -```shell -npm config get proxy -npm config get https-proxy -// 确定没有设置代理, 返回为null, 否则强制设置为null -npm config set proxy null -npm config set https-proxy null - -npm config get registry -npm config delete registry - -``` - - -### cnpm -为解决国内网络环境的问题,需要使用稳定的网络源 -[淘宝镜像](https://npm.taobao.org/) - -```javascript -npm install -g mirror-config-china --registry=https://registry.npm.taobao.org -npm install -g cnpm --registry=https://registry.npm.taobao.org -ln -s xxx/cnpm /usr/bin/cnpm - -``` - -### install failure - -npm 有9层日志行为 -silent, error, warn, notice, http, timing, info, verbose, silly - -合并代码时,总是被他人的package.json与package-lock.json产生的冲突问题 - -源可能存在问题,如设置淘宝的源,就需要删除registry使用默认的 - -npm cache clean --force -npm config list -npm install -ddd 查看安装细节卡住哪里 - - -# [pnpm](https://pnpm.io/) - -```javascript -pnpm i // 按照依赖 -pnpm add libName --save // 按照库 -``` - -[配置Configuring](https://pnpm.io/configuring) -因为是portable版的vscode?就容易出错? -```js -pnpm // 回显用法 -pnpm store status // 会出现问题, -pnpm store prune // 删除有问题的 -pnpm i // 重新按照 -``` - - +# [npm](https://docs.npmjs.com/) + +```bat +node --harmony script.js --version --help +--harmony 传递给node参数的修饰 +``` + +```javascript +npm init +vim index.js +node index.js +npm init -w ./packages/a // 创建子包 +npm install libraryX --workspace packages/pA // 子工作区按照特定依赖 +npm i libraryX -w packages/pA +``` + +包管理 + +```shell +npm install --registry=https://registry.npm.taobao.org 指定淘宝源的安装 +npm install XXX 安装但不写入package.json +npm install XXX --save 安装且写入package.json中的dependencies +npm install XXX --save-dev 安装且写入package.json中的devDependencies +npm install xxx@a.b.c --save-dev // 安装指定版本 +npm install update xxx --save-dev 指定升级某个包 +npm install xxx@latest --save-dev 安装最新版本 +npm install -ddd // 可以查看安装的细节 +npm install relative-path // 把某个本地包安装进当前工程 +npm lx xxx 查询依赖的库信息 +``` + +npm已经发展几个版本了,npm5发布于2017年,增加了package-lock.json文件,它对应node_modules中目录文件层结构是对应的,是锁定依赖安装结构 + +清除node_modules目录的在非window的命令可参考 + +```shell +find . -name "node_modules" -print | xargs rm -rf +``` + +## 配置 + +### proxy + +```shell +npm config get proxy +npm config get https-proxy +// 确定没有设置代理, 返回为null, 否则强制设置为null +npm config set proxy null +npm config set https-proxy null + +npm config get registry +npm config delete registry + +``` + + +### cnpm +为解决国内网络环境的问题,需要使用稳定的网络源 +[淘宝镜像](https://npm.taobao.org/) + +```javascript +npm install -g mirror-config-china --registry=https://registry.npm.taobao.org +npm install -g cnpm --registry=https://registry.npm.taobao.org +ln -s xxx/cnpm /usr/bin/cnpm + +``` + +### install failure + +npm 有9层日志行为 +silent, error, warn, notice, http, timing, info, verbose, silly + +合并代码时,总是被他人的package.json与package-lock.json产生的冲突问题 + +源可能存在问题,如设置淘宝的源,就需要删除registry使用默认的 + +npm cache clean --force +npm config list +npm install -ddd 查看安装细节卡住哪里 + + +# [pnpm](https://pnpm.io/) + +```javascript +pnpm i // 按照依赖 +pnpm add libName --save // 按照库 +``` + +[配置Configuring](https://pnpm.io/configuring) +因为是portable版的vscode?就容易出错? +```js +pnpm // 回显用法 +pnpm store status // 会出现问题, +pnpm store prune // 删除有问题的 +pnpm i // 重新按照 +``` + +# [Yarn is a package manager](https://yarnpkg.com/) diff --git a/nodejs/quill.md b/web/quill.md similarity index 100% rename from nodejs/quill.md rename to web/quill.md diff --git a/nodejs/test.md b/web/test.md similarity index 100% rename from nodejs/test.md rename to web/test.md diff --git a/nodejs/zip.md b/web/zip.md similarity index 100% rename from nodejs/zip.md rename to web/zip.md