Skip to content

Commit 9834906

Browse files
authored
feat(cli): vscode supports automatic introduction of cloud functions. (#1146)
* feat: VSCode supports automatic introduction of cloud functions. * feat: laf assistant change settings for supports automatic introduction of cloud functions.
1 parent a703675 commit 9834906

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

cli/template/tsconfig.json

+8-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"allowJs": false,
55
"allowUnreachableCode": false,
66
"allowUnusedLabels": false,
7-
"charset": "utf8",
7+
"baseUrl": ".",
8+
"paths": {
9+
"@/*": ["functions/*"]
10+
},
811
"declaration": true,
912
"experimentalDecorators": true,
1013
"emitDecoratorMetadata": true,
@@ -25,16 +28,8 @@
2528
"skipLibCheck": true,
2629
"target": "es2017",
2730
"alwaysStrict": true,
28-
"lib": [
29-
"es2015",
30-
"es6"
31-
],
31+
"lib": ["es2015", "es6"]
3232
},
33-
"include": [
34-
"functions/**/*",
35-
"types/**/*",
36-
],
37-
"exclude": [
38-
"tests",
39-
],
40-
}
33+
"include": ["functions/**/*", "types/**/*"],
34+
"exclude": ["tests"]
35+
}

docs/guide/laf-assistant/index.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ title: laf assistant
1010

1111
## 应用安装
1212

13-
`vs Code` 应用中直接搜索 `laf assistant` 或点击链接[在线安装](https://marketplace.visualstudio.com/items?itemName=NightWhite.laf-assistant)
13+
`VSCode` 应用中直接搜索 `laf assistant` 或点击链接[在线安装](https://marketplace.visualstudio.com/items?itemName=NightWhite.laf-assistant)
1414

1515
:::tip
1616
使用`laf assistant`需 node 版本大于等于 16
1717

1818
node version >= 16
1919
:::
2020

21+
## VSCode 设置修改
22+
23+
设置中搜索`typescript.preferences.importModuleSpecifier`,改成`non-relative`
24+
2125
## 初始化
2226

2327
在对接到 Laf 云开发的前端项目中新建目录 `laf-cloud`
@@ -58,7 +62,7 @@ node version >= 16
5862

5963
## 操作单个云函数
6064

61-
打开`laf-cloud/functions`,任意打开一个云函数,在编辑框右键即可 `发布/下载/运行` 当前云函数。可在 `vs Code` 设置里自定义快捷键,操作更加方便。
65+
打开`laf-cloud/functions`,任意打开一个云函数,在编辑框右键即可 `发布/下载/运行` 当前云函数。可在 `VSCode` 设置里自定义快捷键,操作更加方便。
6266

6367
## 其他功能
6468

0 commit comments

Comments
 (0)