Skip to content

Commit 0c9775d

Browse files
authored
lint plugin init (#24)
* lint plugin init * modify readme.md * modify lint plugin readme.md * modify link plugin readme.md * remove useless files * modify version * modify hwc plugin readme.md
1 parent 380b5a4 commit 0c9775d

32 files changed

+904
-155
lines changed

packages/plugins/hwc/.codecheck/check.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/plugins/hwc/.vscode/debug-ts.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

packages/plugins/hwc/.vscode/i18n-ally-custom-framework.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/plugins/hwc/.vscode/settings.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/plugins/hwc/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,3 @@
1919
## 产品介绍和使用说明
2020

2121
https://opentiny.design/ng-pro/docs/hwcPlugin
22-
23-
## 开发指导
24-
25-
1. 安装tiny cli,请参考 https://opentiny.design/tiny-cli/docs/use-install
26-
27-
2. 执行 npm run watch,会监视源文件的变化
28-
29-
3. 执行 tiny link
30-
31-
4. done,本地执行 tiny hwc 命令,查看效果

packages/plugins/hwc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opentiny/tiny-plugin-hwc",
33
"private": false,
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"description": "",
66
"main": "dist/index.js",
77
"typings": "dist/index.d.ts",

packages/plugins/link/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opentiny/tiny-plugin-link",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "提供本地软链接工程,提升组件开发、调试效率",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",

packages/plugins/link/readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
1111
1. 第一步:首先将 lazyload 软链到 .tiny/LocalCDNPath 目录去。
1212
`执行tiny link 或者 tiny link init`
13-
![init](./doc/init.png)
13+
![init](https://github.com/opentiny/tiny-cli/blob/dev/packages/plugins/link/doc/init.png)
1414
此时在个人的用户目录下会存在一份目标组件的软链接:
15-
![initlink](./doc/initlink.png)
15+
![initlink](https://github.com/opentiny/tiny-cli/blob/dev/packages/plugins/link/doc/initlink.png)
1616

1717
2. 第二步:在.tiny/LocalCDNPath 目录查找 @opentiny/xxxx 组件,找到的话,将页面依赖的@opentiny/xxxx 删除,将.tiny/LocalCDNPath 下的组件软链到页面项目中去。
1818
`执行tiny link -m @opentiny/xxx 本例中xxx表示lazyload`
19-
![insert](./doc/insert.png)
19+
![insert](https://github.com/opentiny/tiny-cli/blob/dev/packages/plugins/link/doc/insert.png)
2020
此时,在测试工程中,就会将目标组件软链接过来,如:
21-
![insertlink](./doc/insertlink.png)
21+
![insertlink](https://github.com/opentiny/tiny-cli/blob/dev/packages/plugins/link/doc/insertlink.png)
2222

2323
## 使用场景
2424

packages/plugins/link/src/lib/init.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ async function initLink(options: any) {
3535
if (!fs.existsSync(path.join(homePath, './LocalCDNPath'))) {
3636
fs.mkdirSync(`${homePath}` + '/LocalCDNPath');
3737
}
38-
let scope = ''
38+
let scope = '';
3939
if (pkgName.startsWith('@') && pkgName.split('/').length > 1) {
40-
scope = pkgName.split('/')[0]
40+
scope = pkgName.split('/')[0];
4141
}
42-
if (scope && !fs.existsSync(path.join(homePath, `./LocalCDNPath/${scope}`))) {
42+
if (
43+
scope &&
44+
!fs.existsSync(path.join(homePath, `./LocalCDNPath/${scope}`))
45+
) {
4346
fs.mkdirSync(`${homePath}` + `/LocalCDNPath/${scope}`);
4447
}
4548

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
max_line_length = 80
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
max_line_length = 0
15+
trim_trailing_whitespace = false

0 commit comments

Comments
 (0)