From 9b5d70009298e28113853bdf19be0dfd439dd548 Mon Sep 17 00:00:00 2001 From: lmj01 Date: Fri, 14 Jun 2024 17:31:09 +0800 Subject: [PATCH] update --- dev-note/buildSystem.md | 18 ++++++++++++++++++ dev-note/cmake.md | 9 +++++++++ dev-note/git.md | 2 ++ web/pkg.md | 15 +++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/dev-note/buildSystem.md b/dev-note/buildSystem.md index 535c024..d60211b 100644 --- a/dev-note/buildSystem.md +++ b/dev-note/buildSystem.md @@ -20,3 +20,21 @@ > a fast, scalable, multi-language and extensible build system. [github代码](https://github.com/bazelbuild/bazel) + +## [VisualStudio]() + +[devenv](https://learn.microsoft.com/zh-cn/visualstudio/ide/reference/devenv-command-line-switches?view=vs-2019) +[使用生成项目时,建议使用MSBuild](https://learn.microsoft.com/zh-cn/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2019) + +```shell +# *.vcproj vs2008之前 +# *.vcxproj vs2010之后 +# *.sln 包含多个项目以及依赖关系 +msbuild name.vcxproj +# -p 编译参数 -t 编译目标 +# /p:configuration=debug/release +# /p:platform=x64/x32 +# /p:PreferredToolArchitecture=x64 // 使用64位编译工具 +# /t:rebuild +# /t:clean +``` diff --git a/dev-note/cmake.md b/dev-note/cmake.md index b908305..4f79f83 100644 --- a/dev-note/cmake.md +++ b/dev-note/cmake.md @@ -2,6 +2,15 @@ ## 详解 +- 目标Target +- 属性Properties +- private私有属性在内部使用 +- interface接口属性由外部使用 + +CMake缓存变量 +- Normal Variable,普通变量,相当于一个局部变量。在同一个CMake工程中使用,会有作用域限制或区分。 +- Cache Variable,缓存变量,相当于一个全局变量。在同一个CMake工程中任何地方都可以使用 + ### aux_source_directory 查找某个路径下的所有资源文件 diff --git a/dev-note/git.md b/dev-note/git.md index 74d8971..4af0eb5 100644 --- a/dev-note/git.md +++ b/dev-note/git.md @@ -227,6 +227,8 @@ git init git remote add origin git@github.com:Username/Repositories_Name.git # 现在这样仓库就处理好了。 ``` +## [hook](https://git-scm.com/docs/githooks) + # Subversion diff --git a/web/pkg.md b/web/pkg.md index 1d2fbad..e41fbee 100644 --- a/web/pkg.md +++ b/web/pkg.md @@ -5,6 +5,7 @@ ```js node --watch index.js // v18.15.0后增加的,可以不用每次都输入,直接关联某个文件的变化 node --harmony script.js --version --help --harmony 传递给node参数的修饰 +node -p // node REPL 交互环境 ``` ## 包管理 @@ -46,6 +47,13 @@ npm config get cache // 缓存路径 npm cache clean --force npm config list ``` +#### 2024-6-7 +```json +"script":{ + "dev": "cross-env VITE_APP_VERSION=$(node -p \"require('./package.json').version\") vite --mode localdev", +} +``` +在sprintRay的一个AICAD中,通过这样来获取环境变量,其实 ### [pnpm](https://pnpm.io/) @@ -70,6 +78,7 @@ pnpm config set store-dir e:\dev-data\.pnpm-store\v3 --global // 设置存储目 ```shell yarn install yarn install --registry https://registry.npm.taobao.org +yarn install --force // 强制按照 // 清除缓存 yarn cache dir // 查看路径 yarn cache clean // 清理 @@ -103,6 +112,12 @@ Vue-cli3开始把webpack.config.js隐藏在node_modules/@vue/cli-service/webpack Parcel is a zero configuration build tool for the web Parcel默认把所有文件打包进js包中,不存在单独的静态文件目录,需要借助插件来完成[parcel-reporter-static-files-copy](https://www.npmjs.com/package/parcel-reporter-static-files-copy) +### [Lerna](https://lerna.js.org/) + +Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository. + +[github](https://github.com/lerna/lerna) + ## 相关库 ### [nvm-windows](https://github.com/coreybutler/nvm-windows/releases)