blog
blog copied to clipboard
红日初升,其道大光:sun_with_face::house_with_garden:请star或watch,不要fork
```bash $ cd /usr/local/bin/n && sudo make uninstall ``` or just ```bash $ sudo rm -rf /usr/local/bin/n ```
有的时候我们想要同时生成压缩和未压缩的文件,比如我们构建 lib 包的时候,我们希望用户能够使用压缩过后的代码文件作为 cdn 文件,最简单的一个方式就是通过指定环境变量,比如指定 MINIFY,如下: ```js const path = require('path') const isMinify = process.env.MINIFY /** * @type {import('webpack').Configuration} */ const config = { entry: { index: './src/index.js' }, output:...
### 使用案例 **将选中的文本替换** 选中文本转化为大写: ```ts import * as vscode from 'vscode' import { Range, commands } from 'vscode' export function activate(context: vscode.ExtensionContext) { console.log('active') const disposable = commands.registerTextEditorCommand('uppercase.toUpperCase', toUpperCase) context.subscriptions.push(disposable)...
**导入svg**  在全局中添加声明: ```ts declare module '*.svg' { const content: string export default content } ```
```bash pm2 start npm --name test -- start ```
```bash pm2 start main.py -x --interpreter python --name myprocess ```