You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -403,6 +403,11 @@ source_path = [
403
403
"!vendor/colorful-.+.dist-info/.*",
404
404
"!vendor/colorful/__pycache__/?.*",
405
405
]
406
+
}, {
407
+
path = "src/nodejs14.x-app1",
408
+
npm_requirements = true,
409
+
npm_tmp_dir = "/tmp/dir/location"
410
+
prefix_in_zip = "foo/bar1",
406
411
}, {
407
412
path = "src/python3.8-app3",
408
413
commands = [
@@ -424,8 +429,9 @@ source_path = [
424
429
]
425
430
```
426
431
427
-
Few notes:
432
+
*Few notes:*
428
433
434
+
- If you specify a source path as a string that references a folder and the runtime begins with `python` or `nodejs`, the build process will automatically build python and nodejs dependencies if `requirements.txt` or `package.json` file will be found in the source folder. If you want to customize this behavior, please use the object notation as explained below.
429
435
- All arguments except `path` are optional.
430
436
-`patterns` - List of Python regex filenames should satisfy. Default value is "include everything" which is equal to `patterns = [".*"]`. This can also be specified as multiline heredoc string (no comments allowed). Some examples of valid patterns:
431
437
@@ -442,10 +448,12 @@ Few notes:
442
448
!abc/def/hgk/.* # Filter out again in abc/def/hgk sub folder
443
449
```
444
450
445
-
-`commands` - List of commands to run. If specified, this argument overrides `pip_requirements`.
451
+
-`commands` - List of commands to run. If specified, this argument overrides `pip_requirements` and `npm_requirements`.
446
452
-`:zip [source] [destination]` is a special command which creates content of current working directory (first argument) and places it inside of path (second argument).
447
453
-`pip_requirements` - Controls whether to execute `pip install`. Set to `false` to disable this feature, `true` to run `pip install` with `requirements.txt` found in `path`. Or set to another filename which you want to use instead.
448
454
-`pip_tmp_dir` - Set the base directory to make the temporary directory for pip installs. Can be useful for Docker in Docker builds.
455
+
-`npm_requirements` - Controls whether to execute `npm install`. Set to `false` to disable this feature, `true` to run `npm install` with `package.json` found in `path`. Or set to another filename which you want to use instead.
456
+
-`npm_tmp_dir` - Set the base directory to make the temporary directory for npm installs. Can be useful for Docker in Docker builds.
449
457
-`prefix_in_zip` - If specified, will be used as a prefix inside zip-archive. By default, everything installs into the root of zip-archive.
450
458
451
459
### Building in Docker
@@ -455,7 +463,7 @@ If your Lambda Function or Layer uses some dependencies you can build them in Do
0 commit comments