New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

serverless-package

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-package

An alternative approach to packaging for Serverless

latest
npmnpm
Version
0.2.0
Version published
Weekly downloads
20
185.71%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-package

An alternative approach to packaging for Serverless

Why?

Unlike most, I write my serverless apps in Python.

When including third party packages, it can be quite messy, especially for the output of git status.

This approach allows me to install them into a dist/ directory using "pip install -t dist/ ..." and then .gitignore that directory.

Usage

  • Add "serverless-packages" to your plugins list.

  • Specify an artifact in your existing package config

    This disables the built in packager, and enables this one.

  • Add a custom.package section

    This is a map of root paths to lists of glob-all terms.

Example

plugins:
  - serverless-package

package:
  artifact: .serverless/package.zip

custom:
  package:
    sources:
      "./src/":
        - "**"          # Include everything
        - "!**/*.pyc"   # Except the .pyc files
      "./dist/":
        - "**"                      # Include everything
        - "!**/*.pyc"               # Except .pyc files
        - "!*@(dist|egg)-info/**"   # Or pip's book-keeping files

Command

Additionally, this adds the "package" command.

sls package

This will only run the serverless-package command, not the built in packaging.

FAQs

Package last updated on 22 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts