Skip to content

Commit c73c488

Browse files
committed
added package-zip(linux) command
1 parent 92c6b61 commit c73c488

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,18 @@ See [Cloud Functions Local Emulator](https://cloud.google.com/functions/docs/emu
7777

7878
If you prefer command-line interface instead of Visual Studio Code than use the next commands to create zip archive for deployment.
7979

80-
For Windows using PowerShell:
80+
For Windows using `PowerShell`:
8181

8282
```bash
8383
npm run package-zip(windows)
8484
```
8585

86+
For Linux/Unix using `zip` utility (you have to install it before):
87+
88+
```bash
89+
npm run package-zip(linux)
90+
```
91+
8692
It creates `helloWorld.zip` that includes `index.js`, `package.json`, `settings.json` files.
8793
`helloWorld.zip` is ready to be deployed to **Google Cloud Platform**.
8894

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"deploy-local": "tsc && functions deploy helloWorld --trigger-http",
8-
"package-zip(windows)": "powershell Compress-Archive -Force -LiteralPath index.js, package.json, settings.json -DestinationPath helloWorld.zip"
8+
"package-zip(windows)": "powershell Compress-Archive -Force -LiteralPath index.js, package.json, settings.json -DestinationPath helloWorld.zip",
9+
"package-zip(linux)": "zip helloWorld.zip index.js package.json settings.json"
910
},
1011
"author": "Aleksandr Sokolovskii",
1112
"license": "Apache-2.0",

0 commit comments

Comments
 (0)