✨ null-cli 来啦 一行命令提高你的效率

null-cli

null-cli 是什么 ?

在日常开发工作中,

我们需要用到各式各样的工具

用 有道翻译 来翻译单词

用 postman 来调试网络请求

用 express 来 启动 web 服务器

用 vue-cli , create-react-app 来搭建前端工程 …

在不同的应用程序间来回切换难免觉得繁琐~

所以就有了 null-cli ! 一个命令行界面工具,集成了我们常用的一些功能~

null-cli 有哪些功能 ?

1. 压缩文件

压缩指定文件,file 文件类型可以是文件夹或者单个文件路径,文件夹路径会自动压缩该文件夹所有的 html/css/js 文件(支持文件类型 : html/css/js)。

null

2. 网络请求

发送 http 请求,目前只支持无头 get 请求 ~ (在命令行拼 header,body 感觉很繁琐,不如 postman 便捷)

null

3. 有道翻译

支持中英文翻译,根据传入的 word 自动识别中英文

null

这个 功能 借鉴了 https://github.com/kenshinji/yddict的实现。

4. 打开浏览器

通过你的默认浏览器打开指定的 url

$ null open <url>

5. 生成二维码

生成指定 url 的二维码

null

6. 正则表达式

常用正则表达式

null

7. 生成随机数

生成指定长度的随机数

null

8. 创建模版工程

null

v1 提供了 4 类基础模版 ,v2 将对模版进行细化。

  • vue

  • react

  • koa

  • active-page

9. 日期格式转换

日期格式转换,时间戳和字符串互相转换

null

10. 启动 web 服务器

指定工程启动 web 服务器

null

11. 字符串编解码/AES 加解密

null

null

如何使用 null-cli ?

安装


 npm install null-cli -g

 yarn add null-cli -g

项目地址

https://github.com/webfansplz/null-cli

文档地址

https://webfansplz.github.io/null-cli/

结语

如果有帮助到你,麻烦请给作者一个小星星支持作者,万分感谢 。🙏🙏🙏

npm error code EPERM npm error syscall open npm error path C:\Program Files\nodejs\node_cache\_cacache\tmp\a79bca43 npm error errno EPERM npm error FetchError: Invalid response body while trying to fetch https://registry.npmmirror.com/@vue%2fcli-plugin-babel: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\a79bca43' npm error at C:\NodeJS\node_modules\npm\node_modules\minipass-fetch\lib\body.js:170:15 npm error at async Response.json (C:\NodeJS\node_modules\npm\node_modules\minipass-fetch\lib\body.js:75:17) npm error at async RegistryFetcher.packument (C:\NodeJS\node_modules\npm\node_modules\pacote\lib\registry.js:98:25) npm error at async RegistryFetcher.manifest (C:\NodeJS\node_modules\npm\node_modules\pacote\lib\registry.js:128:23) npm error at async #fetchManifest (C:\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1214:20) npm error at async #nodeFromEdge (C:\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1052:19) npm error at async #buildDepStep (C:\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:916:11) npm error at async Arborist.buildIdealTree (C:\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:182:7) npm error at async Promise.all (index 1) npm error at async Arborist.reify (C:\NodeJS\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:117:5) { npm error code: 'EPERM', npm error errno: 'EPERM', npm error syscall: 'open', npm error path: 'C:\\Program Files\\nodejs\\node_cache\\_cacache\\tmp\\a79bca43', npm error type: 'system', npm error requiredBy: '.' npm error } npm error npm error The operation was rejected by your operating system. npm error It's possible that the file was already in use (by a text editor or antivirus), npm error or that you lack permissions to access it. npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator. npm error Log files were not written due to an error writing to the directory: C:\Program Files\nodejs\node_cache\_logs npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal ERROR Error: command failed: npm install --loglevel error --legacy-peer-deps Error: command failed: npm install --loglevel error --legacy-peer-deps at ChildProcess.<anonymous> (C:\NodeJS\node_modules\@vue\cli\lib\util\executeCommand.js:138:16) at ChildProcess.emit (node:events:508:28) at cp.emit (C:\NodeJS\node_modules\@vue\cli\node_modules\cross-spawn\lib\enoent.js:34:29) at maybeClose (node:internal/child_process:1101:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) Error: Command failed: vue create vue-project --skipGetStarted --packageManager npm --no-git --inlinePreset {"useConfigFiles":false,"plugins":{"@vue/cli-plugin-babel":{},"@vue/cli-plugin-router":{"historyMode":false},"@vue/cli-plugin-eslint":{"config":"base","lintOn":["save"]}},"vueVersion":"3"} Creating project in C:\Users\Lillard\Desktop\vue\vue-project. ⚙️ Installing CLI plugins. This might take a while... at makeError (C:\NodeJS\node_modules\@vue\cli\node_modules\execa\index.js:174:9) at C:\NodeJS\node_modules\@vue\cli\node_modules\execa\index.js:278:16 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async C:\NodeJS\node_modules\@vue\cli\node_modules\@vue\cli-ui\apollo-server\connectors\projects.js:354:5 at async Object.wrap (C:\NodeJS\node_modules\@vue\cli\node_modules\@vue\cli-ui\apollo-server\connectors\progress.js:39:14) { code: 1, stdout: ' Creating project in C:\\Users\\Lillard\\Desktop\\vue\\vue-project.\n' + '⚙️ Installing CLI plugins. This might take a while...\n' + '\n', stderr: null, failed: true, signal: null, cmd: 'vue create vue-project --skipGetStarted --packageManager npm --no-git --inlinePreset {"useConfigFiles":false,"plugins":{"@vue/cli-plugin-babel":{},"@vue/cli-plugin-router":{"historyMode":false},"@vue/cli-plugin-eslint":{"config":"base","lintOn":["save"]}},"vueVersion":"3"}', timedOut: false, killed: false
11-16
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值