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

fuse

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fuse

Command line combiner for fusing mutliple JavaScript files into one

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.6K
increased by50.59%
Maintainers
1
Weekly downloads
 
Created
Source

Fuse Build Status

Fuse is a command line tool to fuse multiple JavaScript files into one, and optionally compress or mangle the JavaScript code.

Introduction

Fuse is a simple cli tool to combine multiple JavaScript files into one. It also makes use of UglifyJS2 to either compress, or mangle or do both to the output of the JavaScript. It's designed to be simple, do less and be easy to use.

Installation (via NPM)

[sudo] npm install fuse -g

You need to install it globally, because it's not something that you can require in your nodejs code. It's only a command line program.

Running tests (via NPM)

npm test

Tests are run using Mocha. You can also run make test to run the tests.

Usage

In your JavaScript file

Fuse uses inline comment-based directives to determine which JavaScript files you'd like to determine. Use the following syntax in your main JavaScript file to inform Fuse about which JavaScript file you'd like to fuse and where.

// @depends path/to/javascript/file.js

Passing a file with the line above to Fuse, will produce a file containing the original JavaScript and the content of path/to/javascript/file.js in the exact position of the depends statement.

On the command line

To run just once:

fuse -i path/to/main.js -o path/to/output.js

To watch a file for changes:

fuse -i path/to/main.js -o path/to/output.js -w

When watching, Fuse will automatically watch any referenced files for changes too, and recompile the output file upon any changes to reference files.

To compress the output using UglifyJS2:

fuse -i path/to/main.js -o path/to/output.js -c

To mangle the output using UglifyJS2:

fuse -i path/to/main.js -o path/to/output.js -m

To compress and mangle, and watch:

fuse -i path/to/main.js -o path/to/output.js -c -m -w

To lint with jshint before combining:

fuse -i path/to/main.js -o path/to/output.js -l

Keywords

FAQs

Package last updated on 08 Mar 2013

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