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

merger-js

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merger-js

Yet another light weight and simple build tool for JavaScript files, with auto build capabilities and smart CLI tooling.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-98.76%
Maintainers
1
Weekly downloads
 
Created
Source

merger-js

Yet another light weight and simple cross-platform build tool for JavaScript files, with file imports, auto build capabilities, smart CLI tooling and native OS notifications.

Because merger uses uglify-es for minification, you don't need to use any kind of transpilers in conjunction with this tool. You can use ES6+.

This tool is intended for very small projects.

merger does not support circular dependencies

NPM: LINK
GitHub: LINK
License: MIT
Dependencies:
├── uglify-es
├── neo-async
├── chokidar
├── commander
├── inquirer
├── node-notifier



Getting Started

1) Node.js

You will need Node.js installed to run merger.

2) Install merger with NPM

Install globally -g with NPM:

npm i merger-js -g

or

npm install merger-js -g

 

Use:

  1. Choose a source file (the first file to be merged) and, on the top of that file, add comments importing the files in the order you want them to be built, from the first to the last.
    Just like in a browser.

    Example:

    // @import 'helpers'
    // @import 'requests'
    // @import 'handlers'
    // @import 'listeners'
    // @import 'feature'
    
    • The extension names .js are optional;
    • The import (// @import) of the source file is optional;
    • (Merger does not support importing files from different directories, yet.)
  2. Run merger init on your working JS directory:

  • If you run merger on your working JS directory, the CLI tool will give you default paths relative to that directory.
  • You can set minify to 'Yes', to minify on build.
  • You can set autoBuild to 'Yes', to make merger listen for file changes and build automatically when there's one.

 

  1. After having a merger-config.json file on the source directory (the directory where your working files are located), you have different alternatives to run merger:
  • You can run merger or merger build, on the source directory, and the merger-config.json folder will be parsed and merger will build with the config you gave it on the config file.
  • You can run merger auto or merger build auto to run a one time auto build session (it watches the source directory for changes and builds when there's one), if you, for example, told the CLI that you didn't want auto builds and you don't want to change that.

 

Versioning

Merger uses SemVer for versioning. You can read the changelog here.

Keywords

FAQs

Package last updated on 04 Apr 2018

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