Skip to content

feat: add snippets #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

waitingsong
Copy link
Member

@waitingsong waitingsong commented Jan 5, 2021

好玩的代码快捷片段,开发时输入以下字符串会有自动代码片段完成:

  • istanbul
  • eslint
  • ipt: import
  • MyError

- istanbul
- eslint
- ipt: import
- MyError
@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #32 (62d408e) into master (88c10f6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #32   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files          31       31           
  Lines         708      708           
  Branches       64       64           
=======================================
  Hits          707      707           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88c10f6...70c79af. Read the comment docs.

@tkvern
Copy link
Member

tkvern commented Jan 6, 2021

好像有midway自带的代码提示呢。

@waitingsong
Copy link
Member Author

waitingsong commented Jan 6, 2021

好像有midway自带的代码提示呢。

相当于是利用 VSCode 的自动提示功能实现代码片段的输出

比如输入 ipt.myerror ,VSCode 就会自动在光标当前位置输出以下代码

import MyError from '@/app/util/my-error'

之前老是记不住 istanbul 代码覆盖忽略行的语法,现在输入 cov else 然后选择自动提示的 cov.ignore-else 就能自动填充以下代码

/* istanbul ignore else */

@tkvern
Copy link
Member

tkvern commented Jan 8, 2021

这个加到wiki作为推荐吧

@waitingsong
Copy link
Member Author

ok

@waitingsong waitingsong closed this Jan 8, 2021
@tkvern
Copy link
Member

tkvern commented Mar 1, 2021

@waitingsong 这个PR的内容加到了README.md 方便有兴趣的同学查看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants