Socket
Socket
Sign inDemoInstall

@vercel/build-utils

Package Overview
Dependencies
0
Maintainers
22
Versions
296
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/build-utils


Version published
Maintainers
22
Created

Package description

What is @vercel/build-utils?

@vercel/build-utils is a utility package designed to assist with the building and deployment of applications on the Vercel platform. It provides a set of tools and functions that help in managing build processes, handling file systems, and working with environment variables, among other tasks.

What are @vercel/build-utils's main functionalities?

File System Utilities

This feature provides utilities for working with the file system, such as globbing patterns to find files and downloading files. The code sample demonstrates how to use the `glob` function to find all files in a directory.

const { glob, download, FileFsRef } = require('@vercel/build-utils');

async function example() {
  const files = await glob('**', '/path/to/directory');
  console.log(files);
}

example();

Environment Variables

This feature helps in managing environment variables for a package. The code sample shows how to retrieve environment variables for a specific package.

const { getEnvForPackage } = require('@vercel/build-utils');

async function example() {
  const env = await getEnvForPackage('/path/to/package');
  console.log(env);
}

example();

Build Metadata

This feature allows you to retrieve build metadata for a project. The code sample demonstrates how to get build metadata for a given project.

const { getBuildMetadata } = require('@vercel/build-utils');

async function example() {
  const metadata = await getBuildMetadata('/path/to/project');
  console.log(metadata);
}

example();

Other packages similar to @vercel/build-utils

FAQs

Last updated on 05 Nov 2020

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc