-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change lf feature and update docs (#27)
* fix: delete hot100 add study plan list * fix: delete hot100 add study plan list * fix: change plan list question title to cn * fix: change plan list question title to cn * fix: get all is not success * fix: get all is not success * chore: pkg config * chore: del pkg config * chore: modify package.json * chore: modify code * chore: del some * * chore: modify docs * chore: del test hot 100 --------- Co-authored-by: SmallTeddy <[email protected]>
- Loading branch information
1 parent
5672faa
commit 3b7e129
Showing
13 changed files
with
149 additions
and
120 deletions.
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 |
---|---|---|
|
@@ -35,6 +35,7 @@ resources/stores/* | |
# cli-dist | ||
pl-cli | ||
*/colorFont.js | ||
pl-build | ||
|
||
# package manager | ||
yarn.lock | ||
|
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
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 |
---|---|---|
|
@@ -24,10 +24,10 @@ | |
|
||
### 0. 预备条件 | ||
|
||
| 工具 | 备注 | | ||
|----------|:----------------:| | ||
| nodejs | lts | | ||
| git | lts | | ||
| 工具 | 备注 | | ||
| -------- | :------------------------: | | ||
| nodejs | lts | | ||
| git | lts | | ||
| computer | 能够运行chrome和代码编辑器 | | ||
| patience | 一颗能够坚持刷题的心 | | ||
|
||
|
@@ -36,7 +36,9 @@ | |
> git:[git下载地址](https://git-scm.com/downloads) | ||
### 1. 我可以怎么用? (三种方案供你选择) | ||
|
||
#### 方案A.脚手架 CLI (推荐) | ||
|
||
此方案是最为推荐的使用方案,通过脚手架指令`lc`、`lk`、`lf`自由灵活的在任意的目录中创建并检查你的题解。 | ||
|
||
> 使用预览 | ||
|
@@ -45,7 +47,7 @@ | |
|
||
如果你想要快速的创建一个自己的题解库,可以使用我们的模板项目进行快速的创建github项目,并且获得完善的初始化内容。 | ||
|
||
> 使用预览 | ||
> 使用预览 | ||
#### 方案C.插件 Plugin (支持,待开发) | ||
|
||
|
@@ -54,11 +56,12 @@ | |
> 使用预览 | ||
### 2. 我应该怎么用?(三种方案的详细的安装和使用教程) | ||
|
||
#### 方案A.脚手架 CLI | ||
|
||
##### 1.安装 | ||
|
||
你可以使用任意一款npm包管理软件(例如*`*npm*`*,*`*yarn*`*,*`*pnpm*`*等)的在`项目`中或者`全局`进行安装。 | ||
你可以使用任意一款npm包管理软件(例如`npm`,`yarn`,`pnpm`等)的在`项目`中或者`全局`进行安装。 | ||
|
||
```shell | ||
# 示例:全局安装 | ||
|
@@ -179,7 +182,7 @@ MODE: identity | |
|
||
e.g. 以我个人的项目为例 | ||
|
||
```shell | ||
```shell | ||
# 这里只是示例,请拉取自己的项目(在你看到这进行尝试的时候,此项目可能已经被清理,正常现象请勿疑惑) | ||
git clone [email protected]:wh131462/my-leetcode-practice.git | ||
# 移动进项目目录 | ||
|
@@ -200,15 +203,16 @@ yarn lc | |
``` | ||
|
||
你也可以使用指令`lc`来创建,当然,你只能在项目中使用我们的脚本(如果你没有全局安装`leetcode-practice`的话)。 | ||
|
||
```shell | ||
# 使用lc 会在当前工作目录创建 如果 需要和脚本的表现保持一致(指在src目录下创建),请使用 -d src 参数 | ||
lc | ||
``` | ||
|
||
> 注意:在这里进行一下强调,项目内指令的说法是指指令的作用范围限制是当前的项目目录,也就是说在其他的目录,你尝试使用lc指令会发现不起作用。 | ||
> | ||
> | ||
> 同样的,你也会发现在第一次安装好的时候,在项目内使用lc指令,也是不起作用的,这个时候需要关闭终端(terminal)再打开进行手动的刷新缓存。 | ||
> | ||
> | ||
> npm脚本指在 package.json 中的 scripts 字段下封装的脚本指令。 | ||
###### 3. 更新依赖 | ||
|
@@ -230,48 +234,48 @@ npm i --save-dev leetcode-practice | |
|
||
`KFC`是一个简便记法,可以快速记忆我们的三个核心指令:`lk`,`lf`,`lc`。 | ||
|
||
| 指令 | 说明 | | ||
|----|--------------------------------------------------------| | ||
| lc | 核心创建指令,支持三种创建模式 ( 每日一题、指定题目、随机题目 ) 进行题目的创建 | | ||
| lk | 核心检查指令,支持三种模式对应的题目检测 | | ||
| lf | 核心查找指令,可以快捷的搜索你想要的题目,支持Hot100,关键词搜索,条件筛选等模式进行搜索题目并支持创建 | | ||
| 指令 | 说明 | | ||
| ---- | ------------------------------------------------------------------------------------------------------ | | ||
| lc | 核心创建指令,支持三种创建模式 ( 每日一题、指定题目、随机题目 ) 进行题目的创建 | | ||
| lk | 核心检查指令,支持三种模式对应的题目检测 | | ||
| lf | 核心查找指令,可以快捷的搜索你想要的题目,支持Hot100,关键词搜索,条件筛选等模式进行搜索题目并支持创建 | | ||
|
||
#### [1].lc | ||
|
||
| 简单参数 | 完整参数 | 说明 | | ||
|-----------|--------------|------------------| | ||
| 无参数/`-t` | `--today` | 创建今日的每日一题 | | ||
| 题目编号/`-i` | `--identity` | 创建指定编号对应的题目 | | ||
| `-r` | `--random` | 创建当前目录下未出现过的随机题目 | | ||
| `-e` | `--easy` | 交互式创建题目 | | ||
| 简单参数 | 完整参数 | 说明 | | ||
| ------------- | ------------ | -------------------------------- | | ||
| 无参数/`-t` | `--today` | 创建今日的每日一题 | | ||
| 题目编号/`-i` | `--identity` | 创建指定编号对应的题目 | | ||
| `-r` | `--random` | 创建当前目录下未出现过的随机题目 | | ||
| `-e` | `--easy` | 交互式创建题目 | | ||
|
||
#### [2].lk | ||
|
||
| 简单参数 | 完整参数 | 说明 | | ||
|-----------|--------------|--------------------------------------| | ||
| 无参数/`-t` | `--today` | 检查今日的每日一题 | | ||
| 简单参数 | 完整参数 | 说明 | | ||
| ------------- | ------------ | ---------------------------------------------------------------------- | | ||
| 无参数/`-t` | `--today` | 检查今日的每日一题 | | ||
| 题目编号/`-i` | `--identity` | 检查指定编号对应的题目,会检查当前工作目录下的是否存在指定id对应的题目 | | ||
| `-r` | `--random` | 检查上一次使用随机模式创建的题目 | | ||
| `-e` | `--easy` | 交互式的根据提示去检查对应的题目 | | ||
| `-r` | `--random` | 检查上一次使用随机模式创建的题目 | | ||
| `-e` | `--easy` | 交互式的根据提示去检查对应的题目 | | ||
|
||
> 注意: 当你检测的时候需要注意,使用什么模式去检查,请确保你已经执行过对应模式的创建操作。 | ||
> 指定编号模式除外,因为会优先检查指定的id是否在当前工作目录存在。 | ||
#### [3].lf | ||
|
||
| 简单参数 | 完整参数 | 说明 | | ||
|------|------|---------------------------| | ||
| 无参数 | 无 | 进入交互式查询,可根据提示搜索或筛选题目并创建题目 | | ||
| 简单参数 | 完整参数 | 说明 | | ||
| -------- | -------- | -------------------------------------------------- | | ||
| 无参数 | 无 | 进入交互式查询,可根据提示搜索或筛选题目并创建题目 | | ||
|
||
#### [4].通用参数 | ||
|
||
| 简单参数 | 完整参数 | 说明 | | ||
|------------------|---------------------------|---------------------------------------------------------------------------| | ||
| `-d <directory>` | `--directory <directory>` | 指定工作目录(是一个当前执行目录的相对地址),会影响创建和检查 | | ||
| `-V` | `--version` | 检查版本号 | | ||
| `-h` | `--help` | 获取帮助信息 | | ||
| 简单参数 | 完整参数 | 说明 | | ||
| ---------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | ||
| `-d <directory>` | `--directory <directory>` | 指定工作目录(是一个当前执行目录的相对地址),会影响创建和检查 | | ||
| `-V` | `--version` | 检查版本号 | | ||
| `-h` | `--help` | 获取帮助信息 | | ||
| `-l [language]` | `--language [language]` | 不指定参数为获取当前的语言环境(默认为javascript),指定参数可以设置语言环境为对应语言(如`-l java`可以指定语言环境为java) | | ||
| `-u` | `--update` | 更新当前脚本或者依赖 | | ||
| `-u` | `--update` | 更新当前脚本或者依赖 | | ||
|
||
> 注意:通用参数指三个脚本`lk`,`lf`,`lc`都支持的参数,使用上的语义一般来说是相同的,但是可能有些指令上的行为含义会有所不同(比如`lc`指令指定`-d`参数是指`在指定目录中创建题目`,而`lk`指令指定`-d`参数就是指`在指定目录创建题目`)。 | ||
|
@@ -293,4 +297,4 @@ npm i --save-dev leetcode-practice | |
|
||
### 3.Star趋势图 | ||
|
||
[](https://star-history.com/#EternalHeartTeam/leetcode-practice&Date) | ||
[](https://star-history.com/#EternalHeartTeam/leetcode-practice&Date) |
Oops, something went wrong.