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

babel-deps

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-deps

Compiles javascript files and all their dependencies with babel.

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41
decreased by-32.79%
Maintainers
1
Weekly downloads
 
Created
Source

babel-deps

Compiles javascript files and all their dependencies with babel.

Usage

This tool uses babel to compile a list of files. The main difference from just using babel directly is that this will automatically load and compile any files that weren't given in the input list but are imported as dependencies. The results contain all compiled files, including the extra dependencies.

	var files = [
		{
			contents: fs.readFileSync(path1, 'utf8'),
			options: {filename: path1}
		},
		{
			contents: fs.readFileSync(path1, 'utf8'),
			options: {filename: path1}
		}
	];
	var results = babelDeps(files, babelOptions);

API

files

An array of files to be compiled with their dependencies. Each element of the array should be an object with the following keys:

  • contents {string} The code to be compiled.
  • options {!Object} Options to be passed to babel when compiling this file. Note that the filename option is required.

options

An object with babel options that should be used for all files. File specific options will be merged with this before the file is compiled, so they have higher priority.

Keywords

FAQs

Package last updated on 21 May 2015

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