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

fast-sourcemap-concat

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-sourcemap-concat

Concatenate files while generating or propagating sourcemaps.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
163K
increased by1.32%
Maintainers
4
Weekly downloads
 
Created

What is fast-sourcemap-concat?

The fast-sourcemap-concat npm package is designed to concatenate multiple JavaScript files and generate source maps for them. This is particularly useful in build processes where you need to combine several files into one while maintaining the ability to debug the original source code.

What are fast-sourcemap-concat's main functionalities?

Concatenate JavaScript files

This feature allows you to concatenate multiple JavaScript files into a single output file. The code sample demonstrates how to create a new Concat instance, add files to it, and then finalize the concatenation process.

const Concat = require('fast-sourcemap-concat');
const concat = new Concat({ outputFile: 'output.js' });

concat.addFile('file1.js');
concat.addFile('file2.js');

concat.end();

Generate source maps

This feature enables the generation of source maps while concatenating files. The code sample shows how to enable source map generation by setting the `sourceMap` option to true.

const Concat = require('fast-sourcemap-concat');
const concat = new Concat({ outputFile: 'output.js', sourceMap: true });

concat.addFile('file1.js');
concat.addFile('file2.js');

concat.end();

Add raw content

This feature allows you to add raw content directly to the concatenated output. The code sample demonstrates how to add a raw JavaScript snippet using the `addSpace` method.

const Concat = require('fast-sourcemap-concat');
const concat = new Concat({ outputFile: 'output.js' });

concat.addFile('file1.js');
concat.addFile('file2.js');
concat.addSpace('console.log("Hello World");');

concat.end();

Other packages similar to fast-sourcemap-concat

FAQs

Package last updated on 10 Dec 2019

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