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

grunt-contrib-concat

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-concat

Concatenate files.

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
253K
decreased by-6.29%
Maintainers
6
Weekly downloads
 
Created

What is grunt-contrib-concat?

The grunt-contrib-concat package is a Grunt plugin used to concatenate files. It is commonly used in build processes to combine multiple files into a single file, which can help reduce the number of HTTP requests and improve load times for web applications.

What are grunt-contrib-concat's main functionalities?

Concatenate JavaScript files

This feature allows you to concatenate multiple JavaScript files into a single file. The 'separator' option specifies the string to use between each file in the concatenated output.

{
  "concat": {
    "options": {
      "separator": ";\n"
    },
    "dist": {
      "src": ["src/js/file1.js", "src/js/file2.js"],
      "dest": "dist/js/bundle.js"
    }
  }
}

Concatenate CSS files

This feature allows you to concatenate multiple CSS files into a single file. This can be useful for reducing the number of CSS files that need to be loaded by the browser.

{
  "concat": {
    "css": {
      "src": ["src/css/style1.css", "src/css/style2.css"],
      "dest": "dist/css/styles.css"
    }
  }
}

Custom banner and footer

This feature allows you to add a custom banner at the beginning and a footer at the end of the concatenated file. This can be useful for adding comments or metadata to the output file.

{
  "concat": {
    "options": {
      "banner": "/* My Project - concatenated on <%= grunt.template.today('yyyy-mm-dd') %> */\n",
      "footer": "\n/* End of concatenated files */"
    },
    "dist": {
      "src": ["src/js/file1.js", "src/js/file2.js"],
      "dest": "dist/js/bundle.js"
    }
  }
}

Other packages similar to grunt-contrib-concat

Keywords

FAQs

Package last updated on 03 Apr 2022

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