@faasjs/load 0.0.2-beta.358 → 0.0.2-beta.362

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +51 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -5,3 +5,54 @@
5
5
  [![License: MIT](https://img.shields.io/npm/l/@faasjs/load.svg)](https://github.com/faasjs/faasjs/blob/main/packages/faasjs/load/LICENSE)
6
6
  [![NPM Stable Version](https://img.shields.io/npm/v/@faasjs/load/stable.svg)](https://www.npmjs.com/package/@faasjs/load)
7
7
  [![NPM Beta Version](https://img.shields.io/npm/v/@faasjs/load/beta.svg)](https://www.npmjs.com/package/@faasjs/load)
8
+
9
+ ## Modules
10
+
11
+ ### Functions
12
+
13
+ - [loadConfig](modules.md#loadconfig)
14
+ - [loadTs](modules.md#loadts)
15
+
16
+ ## Functions
17
+
18
+ ### loadConfig
19
+
20
+ ▸ **loadConfig**(`root`, `filename`): `Config`
21
+
22
+ 加载配置
23
+
24
+ #### Parameters
25
+
26
+ | Name | Type | Description |
27
+ | :------ | :------ | :------ |
28
+ | `root` | `string` | 根目录 |
29
+ | `filename` | `string` | 目标文件,用于读取目录层级 |
30
+
31
+ #### Returns
32
+
33
+ `Config`
34
+
35
+ ___
36
+
37
+ ### loadTs
38
+
39
+ ▸ **loadTs**(`filename`, `options?`): `Promise`<{ `dependencies`: { [key: string]: `string`; } ; `module?`: `Func` ; `modules?`: { [key: string]: `string`; } }\>
40
+
41
+ 加载 ts 文件
42
+
43
+ #### Parameters
44
+
45
+ | Name | Type | Description |
46
+ | :------ | :------ | :------ |
47
+ | `filename` | `string` | 完整源文件路径 |
48
+ | `options` | `Object` | 配置项 |
49
+ | `options.input?` | `Object` | 读取配置 |
50
+ | `options.modules?` | `Object` | 生成 modules 的配置 |
51
+ | `options.modules.additions?` | `string`[] | - |
52
+ | `options.modules.excludes?` | `string`[] | - |
53
+ | `options.output?` | `Object` | 写入配置 |
54
+ | `options.tmp?` | `boolean` | 是否为临时文件,true 则生成的文件会被删除,默认为 false |
55
+
56
+ #### Returns
57
+
58
+ `Promise`<{ `dependencies`: { [key: string]: `string`; } ; `module?`: `Func` ; `modules?`: { [key: string]: `string`; } }\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/load",
3
- "version": "0.0.2-beta.358",
3
+ "version": "0.0.2-beta.362",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,9 +22,9 @@
22
22
  "dist"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@faasjs/deep_merge": "^0.0.2-beta.358",
26
- "@faasjs/func": "^0.0.2-beta.358",
27
- "@faasjs/ts-transform": "^0.0.2-beta.358",
25
+ "@faasjs/deep_merge": "^0.0.2-beta.362",
26
+ "@faasjs/func": "^0.0.2-beta.362",
27
+ "@faasjs/ts-transform": "^0.0.2-beta.362",
28
28
  "js-yaml": "*",
29
29
  "rollup": "*"
30
30
  },