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

broccoli-sourcemap-concat

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-sourcemap-concat - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

concat.js

14

package.json
{
"name": "broccoli-sourcemap-concat",
"version": "0.2.2",
"version": "0.2.3",
"description": "Fast, good-enough concatenation with source maps.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},

@@ -14,12 +14,16 @@ "repository": "https://github.com/ef4/broccoli-sourcemap-concat",

"broccoli": "^0.13.3",
"broccoli-merge-trees": "^0.2.1"
"broccoli-merge-trees": "^0.2.1",
"chai": "^1.10.0",
"mkdirp": "^0.5.0",
"mocha": "^2.0.1",
"rsvp": "^3.0.14"
},
"dependencies": {
"broccoli-caching-writer": "git://github.com/ef4/broccoli-caching-writer#master",
"broccoli-caching-writer": "0.5.3",
"broccoli-concat": "0.0.12",
"broccoli-kitchen-sink-helpers": "^0.2.5",
"broccoli-writer": "^0.1.1",
"fast-sourcemap-concat": " ^0.1.1",
"fast-sourcemap-concat": " ^0.1.3",
"lodash-node": "^2.4.1"
}
}

@@ -11,9 +11,10 @@ var helpers = require('broccoli-kitchen-sink-helpers');

init: function(inputTrees, options) {
this.options = merge({
inputFiles: ['**/*.js'],
separator: '\n'
}, options);
if (!this.options.outputFile) {
init: function() {
if (!this.inputFiles) {
this.inputFiles = ['**/*.js'];
}
if (!this.separator) {
this.separator = '\n';
}
if (!this.outputFile) {
throw new Error("outputFile is required");

@@ -25,14 +26,15 @@ }

var concat = this.concat = new ConcatWithSourcemap({
outputFile: path.join(outDir, this.options.outputFile),
sourceRoot: this.options.sourceRoot,
outputFile: path.join(outDir, this.outputFile),
sourceRoot: this.sourceRoot,
baseDir: inDir
});
if (this.options.header) {
concat.addSpace(this.options.header);
if (this.header) {
concat.addSpace(this.header + this.separator);
}
if (this.options.headerFiles) {
this.options.headerFiles.forEach(function(hf) {
if (this.headerFiles) {
this.headerFiles.forEach(function(hf) {
concat.addFile(hf);
concat.addSpace(this.separator);
});

@@ -45,3 +47,3 @@ }

// multiGlob is obtuse.
if (!error.message.match("did not match any files" || !this.options.allowNone)) {
if (!error.message.match("did not match any files" || !this.allowNone)) {
throw error;

@@ -51,8 +53,9 @@ }

if (this.options.footer) {
concat.addSpace(this.options.footer);
if (this.footer) {
concat.addSpace(this.footer + this.separator);
}
if (this.options.footerFiles) {
this.options.footerFiles.forEach(function(ff) {
if (this.footerFiles) {
this.footerFiles.forEach(function(ff) {
concat.addFile(ff);
concat.addSpace(this.separator);
});

@@ -64,3 +67,3 @@ }

addFiles: function(inDir) {
helpers.multiGlob(this.options.inputFiles, {
helpers.multiGlob(this.inputFiles, {
cwd: inDir,

@@ -67,0 +70,0 @@ root: inDir,

Sorry, the diff of this file is not supported yet

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