-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
webfansplz
committed
Nov 29, 2019
1 parent
c0ff820
commit 931d311
Showing
32 changed files
with
345 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
module.exports = { | ||
base: '/null-cli/', | ||
dest: 'docs/dist', | ||
port: 3333, | ||
serviceWorker: true, | ||
locales: { | ||
'/': { | ||
lang: 'zh-CN', | ||
title: 'Null-cli', | ||
description: 'A command to free your hands', | ||
}, | ||
}, | ||
head: [ | ||
[ | ||
'link', | ||
{ | ||
rel: 'icon', | ||
href: '/la-m.png', | ||
}, | ||
], | ||
[ | ||
'meta', | ||
{ | ||
name: 'theme-color', | ||
content: '#3eaf7c', | ||
}, | ||
], | ||
], | ||
themeConfig: { | ||
repo: 'webfansplz/null-cli', | ||
editLinks: true, | ||
docsDir: 'docs', | ||
locales: { | ||
'/': { | ||
label: '简体中文', | ||
selectText: '选择语言', | ||
editLinkText: '在 GitHub 上编辑此页', | ||
lastUpdated: '上次更新', | ||
serviceWorker: { | ||
updatePopup: { | ||
message: '发现新内容可用', | ||
buttonText: '刷新', | ||
}, | ||
}, | ||
nav: [ | ||
// { | ||
// text: '文档', | ||
// link: '/API/install.html' | ||
// } | ||
], | ||
}, | ||
}, | ||
sidebar: { | ||
'/guide/': [ | ||
{ | ||
title: '使用指南', | ||
collapsable: false, | ||
children: ['install', 'introduce', 'use'], | ||
}, | ||
{ | ||
title: '命令', | ||
collapsable: false, | ||
children: [ | ||
'fetch', | ||
'youdao', | ||
'open', | ||
'qrcode', | ||
'regex', | ||
'random', | ||
'create', | ||
'day', | ||
'serve', | ||
'enc', | ||
'dec', | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
home: true | ||
heroImage: /null.png | ||
actionText: 开始使用 | ||
actionLink: /guide/install.html | ||
|
||
footer: MIT Licensed | Copyright © 2019-present null | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 创建前端工程 | ||
|
||
```shell | ||
$ null create <probject-name> | ||
``` | ||
|
||
 | ||
|
||
## 参数 | ||
|
||
- -f --force (Overwrite target directory if it exists) | ||
|
||
## 模版类型 | ||
|
||
v1 提供了以下 4 类基础模版 | ||
|
||
- vue | ||
|
||
- react | ||
|
||
- koa | ||
|
||
- active-page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 日期格式转换 | ||
|
||
```shell | ||
$ null day <params> | ||
``` | ||
|
||
 | ||
|
||
## 参数 | ||
|
||
| name | alias | 默认值 | 可选值 | | ||
| :-: | :-: | :-: | :-: | | ||
| -f | --format | YYYY-MM-DD HH:mm:ss | 同 moment.js | | ||
| -t | --type | string | string(13 位时间戳->字符串),unix(字符串->13 位时间戳) | | ||
|
||
```shell | ||
null day 1574765068684 # 2019-11-26 18:44:28 | ||
|
||
null day "2020-01-01 18:18:18" -t unix # 1577873898000 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 字符串解码/AES 解密 | ||
|
||
```shell | ||
null dec <string> | ||
``` | ||
|
||
 | ||
|
||
 | ||
|
||
## 字符串解码 参数 | ||
|
||
| name | alias | 默认值 | 可选值 | | ||
| :--: | :------: | :----: | :--------: | | ||
| -m | --method | base64 | base64,hex | | ||
|
||
```shell | ||
|
||
null dec bnVsbC1jbGk= # null-cli | ||
|
||
null dec 6e756c6c2d636c69 -m hex # null-cli | ||
|
||
``` | ||
|
||
## AES 解密 参数 | ||
|
||
| name | alias | 默认值 | 可选值 | | ||
| :--: | :------: | :--------------: | :------------: | | ||
| -m | --method | base64 | aes | | ||
| -k | --key | 20201111nullbest | 任意 16 位字符 | | ||
| -i | --iv | webbestlangworld | 任意 16 位字符 | | ||
|
||
```shell | ||
null dec b425ed8b1698de56aed3d1089ade239d -m aes # null-cli | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 字符串编码/AES 加密 | ||
|
||
```shell | ||
null enc <string> | ||
``` | ||
|
||
 | ||
|
||
 | ||
|
||
## 字符串编码 参数 | ||
|
||
| name | alias | 默认值 | 可选值 | | ||
| :--: | :------: | :----: | :---------------------------------------------: | | ||
| -m | --method | base64 | sha1,sha224,sha256,sha384,sha512,md5,base64,hex | | ||
|
||
```shell | ||
null enc null-cli # bnVsbC1jbGk= | ||
|
||
null enc null-cli -m sha1 # a0071acf7a33712783545db8b4a7a89f0a35013d | ||
|
||
null enc null-cli -m sha256 # fe8f4fa399ff4888b4d393c8dd09ba35385db71e12d627d83cc65d89ba83fc9b | ||
|
||
null enc null-cli -m md5 # 91732209f7c84dd6119c81fd8b1a9669 | ||
``` | ||
|
||
## AES 加密 参数 | ||
|
||
| name | alias | 默认值 | 可选值 | | ||
| :--: | :------: | :--------------: | :------------: | | ||
| -m | --method | base64 | aes | | ||
| -k | --key | 20201111nullbest | 任意 16 位字符 | | ||
| -i | --iv | webbestlangworld | 任意 16 位字符 | | ||
|
||
```shell | ||
null enc null-cli -m aes # b425ed8b1698de56aed3d1089ade239d | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 网络请求 | ||
|
||
```shell | ||
$ null fetch <url> | ||
``` | ||
|
||
目前只支持无头 get 请求 ~ (在命令行拼 header,body 感觉很繁琐,不如 postman 便捷) | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 安装 | ||
|
||
**NPM** | ||
|
||
```shell | ||
$ npm install null-cli -g | ||
``` | ||
|
||
**YARN** | ||
|
||
```shell | ||
$ yarn add null-cli -g | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 介绍 | ||
|
||
 | ||
|
||
:man_technologist:在日常开发工作中, | ||
|
||
我们经常会做一些重复性劳动,也经常需要在不同应用中来回切换。 :woman_technologist: | ||
|
||
:star2:null-cli 的目标,当然不是没有蛀牙, | ||
|
||
而是希望减少你使用 CV 大法的频率 , 避免你 Switch applications 的繁琐 。:punch: | ||
|
||
:fire: We hope , A command frees your hands 。 :tada: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 打开浏览器 | ||
|
||
```shell | ||
$ null open <url> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 生成二维码 | ||
|
||
```shell | ||
$ null qrcode <url> | ||
``` | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 生成随机数 | ||
|
||
```shell | ||
$ null random <length> | ||
``` | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 正则表达式 | ||
|
||
```shell | ||
$ null regex | ||
``` | ||
|
||
 | ||
|
||
## 表达式列表 | ||
|
||
- 纯数字 | ||
|
||
- 纯汉字 | ||
|
||
- 纯英文字母 | ||
|
||
- 中文/英文/数字 | ||
|
||
- 日期格式(例:2019-11-11) | ||
|
||
- 6-16 位数字字母组合 | ||
|
||
- 邮箱地址(email) | ||
|
||
- ip 地址(v4) | ||
|
||
- 邮政编码 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 启动 web 服务器 | ||
|
||
```shell | ||
null serve <path> | ||
``` | ||
|
||
 | ||
|
||
## 参数 | ||
|
||
| name | alias | 默认值 | 说明 | | ||
| :--: | :----: | :----: | :----------------: | | ||
| -p | --port | 8000 | 指定端口号 | | ||
| -o | --open | false | 是否自动打开浏览器 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 使用 | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# 有道翻译 | ||
|
||
```shell | ||
null youdao <word> | ||
``` | ||
|
||
 | ||
|
||
```js | ||
|
||
null youdao frontend | ||
/** | ||
Frontend workflows are a different thing than backend workflows. | ||
前端工作流不同于后端工作流。 | ||
The user's client (frontend) application that wants to perform database operations. | ||
那些需要执行数据库操作的用户的客户端(前端)应用。 | ||
The design of the classes are done in such a way that they have no relationship with, or dependency on, the frontend design or platform. | ||
设计这些类的方式使得它们不依赖于前端设计或平台。 | ||
n. 前端 | ||
Frontend workflows are a different thing than backend workflows. | ||
前端工作流不同于后端工作流。 | ||
The user's client (frontend) application that wants to perform database operations. | ||
那些需要执行数据库操作的用户的客户端(前端)应用。 | ||
The design of the classes are done in such a way that they have no relationship with, or dependency on, the frontend design or platform. | ||
设计这些类的方式使得它们不依赖于前端设计或平台。 | ||
**/ | ||
``` | ||
|
||
## 声明 | ||
|
||
这个 功能 借鉴了 [/~https://github.com/kenshinji/yddict](/~https://github.com/kenshinji/yddict)的实现。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters