@ contrast/ distringuish (英语)
用于跟踪有字符串外部化的字符串文字的节点本地模块.
见 本条 技术细节.
使用量
const distringuish = require('@contrast/distringuish');
const externalString = distringuish.externalize(someString);
const props = distringuish.getProperties(externalString); // => {}
props.key = 'value';
// the object returned maintains properties pinned to the string
distringuish.getProperties(externalString); // => { key: "value" }
API 密码
见 指数.d.ts。 。 。 .
externalize(str: string, props?: Record): string | number;
getProperties(str: string): Record | null;
isExternal(str: string): boolean;
internalize(str: string): string;
当地建筑
npm run build 将为您的当前操作系统和架构构建项目.
npm run build:dev 通过 --debug 可在
发展.
npm run download 将取出GitHub最新的建筑文物.
出版
随便跑 npm version 然后援引 release 工作流程。 你们可以跑
release 使用 Github UI 或者,如果你安装了 Github CLI, 你
可以运行 gh workflow run release.yml (也可通过 npm run release) (中文(简体) ).
请注意: upload-artifacts@v4 当有多重时不再工作
同名文物. 这就是为什么 release 工作流程有
下节:
uses: actions/upload-artifact@v4
with:
name: prebuilds-${{ matrix.build-group }}
path: prebuilds/
样式指南
见 .clang 格式。 。 。 .
- 4 个缩进空格
- 打开卷轴套与语句相同