File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,27 @@ All files from `package/include` will be included in the final build file. See [
57
57
58
58
# # Usage
59
59
60
+ # ## Google Cloud Functions
61
+
62
+ When using with Google Cloud Functions via the [serverless-google-cloudfunctions](https://github.com/serverless/serverless-google-cloudfunctions)
63
+ plugin, you simply have to provide a `main` field in your `package.json` :
64
+
65
+ ` ` ` js
66
+ {
67
+ // ...
68
+ "main": "handler.js",
69
+ // ..
70
+ }
71
+ ` ` `
72
+
73
+ And this plugin will automatically compile your typescript correctly. Note
74
+ that the field must refer to the compiled file name, namely, ending with a `.js`
75
+ extension.
76
+
77
+ If a `main` field was not found, then this plugin will use `index.js`. Before
78
+ compilation begins, it will check to see that the file indicated exists with a
79
+ ` .ts` extension before actually trying to compile it.
80
+
60
81
# ## Automatic compilation
61
82
62
83
The normal Serverless deploy procedure will automatically compile with Typescript :
You can’t perform that action at this time.
0 commit comments