Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-build-plugin

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-build-plugin

This plugin is intended to add flexibility to the serverless build process for serverless 1.0.

  • 0.0.1-alpha
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
112
increased by489.47%
Maintainers
1
Weekly downloads
 
Created
Source

SERVERLESS BUILD PLUGIN

This plugin is intended to add flexibility to the serverless build process for serverless 1.0.

Currently in testing state. To try this, simply:

  • npm install both ./test and ./
  • then sls deploy in the test folder with a default AWS profile or export AWS_PROFILE=myprofile.

The plugin can be configured both on the commandline and under custom.build in serverless.yml

  • sls deploy --keep, keep build files and artifacts, do not purge.
  • sls deploy --build=./buildFile.js
  • sls deploy --bundle use bundling instead of a build file.

ROADBLOCKS

  • serverless 1.0 still doesn't support packaging single functions
    • See: #1719 & #1777

FEATURE GOALS

  • Allow for arbitrary build files to export:

    • Functions (which should return any of the below)
    • Webpack configs
    • File strings & buffers
    • File streams
  • Allow for minimal packaging, simply with babel and non-dev dependency resolution and minification in order to maintain the same structure as the source.

    • This will allow issues with webpack to be sidestepped by sacrificing some file size
    • Closer to a node environment

TODO

  • Test webpack building, get parity with severless-webpack-plugin

    • Webpack builds hanlder and source map
    • Purges existing build folder (as an option)
    • Externals are copied over
      • Will be fixed when bundle is combined
    • Ensure parity
  • Combine both buildFile and bundle into one, as bundle will need a build method anyway. Not orthoganal.

  • node_modules packaging

    • Copys them over
      • Nested deps too
    • Purges existing build folder
    • Cleanup
    • Minify .js
  • Create a babel default build method, like webpack, for the servicePath

    • Figure out file include and ignoring to ensure minimal builds on a per function basis

      • Option 1: Use multiple .serverless-(ignore|include) that function like .gitignore files
      • Option 2: Use a serverless.build.yml
        • Specify the build options for each function individually, including root options
        • Can then seperate function includes in a clear way, with both regexp and globs
    • Minify .js

REF

FAQs

Package last updated on 20 Aug 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc