magic-string
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -68,2 +68,6 @@ (function (global, factory) { | ||
addSource: function ( source ) { | ||
if ( typeof source !== 'object' || !source.content ) { | ||
throw new Error( 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' ); | ||
} | ||
this.sources.push( source ); | ||
@@ -143,4 +147,4 @@ return this; | ||
this.intro = indentStr + this.intro.replace( /\n/g, '\n' + indentStr ); | ||
this.outro = this.outro.replace( /\n/g, '\n' + indentStr ); | ||
this.intro = ( this.intro ? indentStr : '' ) + this.intro.replace( /\n(.+)/g, ( '\n' + indentStr + '$1' ) ); | ||
this.outro = this.outro.replace( /\n(.+)/g, ( '\n' + indentStr + '$1' ) ); | ||
@@ -147,0 +151,0 @@ return this; |
{ | ||
"name": "magic-string", | ||
"description": "Modify strings, generate sourcemaps", | ||
"author": "Rich Harris", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"repository": "https://github.com/rich-harris/magic-string", | ||
@@ -6,0 +7,0 @@ "main": "magic-string.js", |
@@ -5,3 +5,3 @@ # magic-string | ||
Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings. | ||
Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps. | ||
@@ -8,0 +8,0 @@ ## Installation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22521
561