https://github.com/pajaydev/bundle-me
Simple Utility to create a common bundle and to fetch all the files based on the options given.
https://github.com/pajaydev/bundle-me
bundle bundle-files create-bundle filesystem getallfiles insidedirectory
Last synced: 12 months ago
JSON representation
Simple Utility to create a common bundle and to fetch all the files based on the options given.
- Host: GitHub
- URL: https://github.com/pajaydev/bundle-me
- Owner: pajaydev
- License: mit
- Created: 2018-09-22T20:17:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T03:58:58.000Z (almost 6 years ago)
- Last Synced: 2025-06-26T12:51:52.837Z (12 months ago)
- Topics: bundle, bundle-files, create-bundle, filesystem, getallfiles, insidedirectory
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# bundle-me [](https://travis-ci.org/pajaydev/bundle-me)
## Install
```
$ npm install --save bundle-me
```
## Usage
### Create Bundle
```js
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
```js
const { getAllFiles } = require('bundle-me');
try {
getAllFiles({ path: filePath });
// returns array of files in the given file path.
}
catch (error) {
console.log(error);
}
```
## Options
```json
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