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

broccoli-concat

Package Overview
Dependencies
Maintainers
6
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-concat

Fast, good-enough concatenation with source maps.

  • 4.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created

What is broccoli-concat?

The broccoli-concat npm package is a Broccoli plugin used to concatenate multiple files into a single file. It is commonly used in build processes to combine JavaScript, CSS, or other types of files to reduce the number of HTTP requests and improve load times.

What are broccoli-concat's main functionalities?

Concatenate JavaScript files

This feature allows you to concatenate all JavaScript files in the 'src/js' directory into a single file named 'app.js' in the 'assets' directory. Source maps are also enabled for easier debugging.

const concat = require('broccoli-concat');

const jsTree = concat('src/js', {
  outputFile: '/assets/app.js',
  inputFiles: ['**/*.js'],
  sourceMapConfig: { enabled: true }
});

Concatenate CSS files

This feature allows you to concatenate all CSS files in the 'src/css' directory into a single file named 'styles.css' in the 'assets' directory. Source maps are also enabled for easier debugging.

const concat = require('broccoli-concat');

const cssTree = concat('src/css', {
  outputFile: '/assets/styles.css',
  inputFiles: ['**/*.css'],
  sourceMapConfig: { enabled: true }
});

Custom file ordering

This feature allows you to specify a custom order for the files to be concatenated. In this example, 'jquery.js' and 'underscore.js' are concatenated first, followed by all other JavaScript files in the 'src/js' directory.

const concat = require('broccoli-concat');

const orderedJsTree = concat('src/js', {
  outputFile: '/assets/app.js',
  inputFiles: ['vendor/jquery.js', 'vendor/underscore.js', '**/*.js'],
  sourceMapConfig: { enabled: true }
});

Other packages similar to broccoli-concat

Keywords

FAQs

Package last updated on 14 Apr 2021

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