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

bundle-me

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bundle-me

Bundles all the files inside the directory

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by40%
Maintainers
1
Weekly downloads
 
Created
Source

bundle-me Build Status

Install

$ npm install --save bundle-me

Usage

Create Bundle

const {createBundle} = require('bundle-me');

 try {
        createBundle({ path: filePath, extn: 'js', outputPath: 'example/bundle.js'})// creates bundle and returns the output path.
    }
    catch (error) {
        console.log(error);
    }

Get All files

const { getAllFiles } = require('bundle-me');

 try {
        getAllFiles({ path: filePath }); 
        // returns array of files in the given file path.
    }
    catch (error) {
        console.log(error);
    }

Options

path : input path of the source directory
extn : File Extension (js,css,ts,etc.)
outputPath: path of the output file. 

Problem

I need to Bundle all the files in a particular directory based on the file extension. I know many libraries are available but it's not simple to use. I need to tweek it a lot, so I thought of creating this.

Solution

Created bundle-me module, which bundle all the files based on the directory into single output file based on your options provided. It provides array of all the files based on the file extension provided.

Example

https://github.com/pajaydev/bundle-me/tree/master/example

License

MIT

Keywords

FAQs

Package last updated on 15 Sep 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