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

@netlify/zip-it-and-ship-it

Package Overview
Dependencies
Maintainers
13
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/zip-it-and-ship-it

Zip it and ship it

  • 0.4.0-8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
181K
increased by7.6%
Maintainers
13
Weekly downloads
 
Created

What is @netlify/zip-it-and-ship-it?

@netlify/zip-it-and-ship-it is a Node.js library designed to bundle and package functions for deployment on Netlify. It helps in zipping up serverless functions and their dependencies, making it easier to deploy them to Netlify's platform.

What are @netlify/zip-it-and-ship-it's main functionalities?

Bundling Functions

This feature allows you to bundle serverless functions from a source directory and output the bundled files to a target directory. The `zipFunctions` method takes two arguments: the source directory and the output directory.

const { zipFunctions } = require('@netlify/zip-it-and-ship-it');

zipFunctions('src/functions', 'out/functions')
  .then(results => console.log('Functions bundled:', results))
  .catch(error => console.error('Error bundling functions:', error));

Detecting Function Dependencies

This feature helps in detecting the dependencies of the functions in a given directory. The `listFunctions` method takes the source directory as an argument and returns a list of functions along with their dependencies.

const { listFunctions } = require('@netlify/zip-it-and-ship-it');

listFunctions('src/functions')
  .then(results => console.log('Function dependencies:', results))
  .catch(error => console.error('Error listing functions:', error));

Zipping Individual Functions

This feature allows you to zip an individual function file and output it as a zip file. The `zipFunction` method takes two arguments: the path to the function file and the output path for the zip file.

const { zipFunction } = require('@netlify/zip-it-and-ship-it');

zipFunction('src/functions/myFunction.js', 'out/functions/myFunction.zip')
  .then(result => console.log('Function zipped:', result))
  .catch(error => console.error('Error zipping function:', error));

Other packages similar to @netlify/zip-it-and-ship-it

Keywords

FAQs

Package last updated on 28 Nov 2019

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