add-dist-header
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -1,2 +0,2 @@ | ||
//! add-dist-header v1.1.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
//! add-dist-header v1.1.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
@@ -3,0 +3,0 @@ export type Settings = { |
@@ -1,2 +0,2 @@ | ||
//! add-dist-header v1.1.2 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
//! add-dist-header v1.1.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License | ||
@@ -39,3 +39,3 @@ import { isBinary } from 'istextorbinary'; | ||
const invalidContent = isBinary(filename); | ||
const input = fs.readFileSync(filename, 'utf-8'); | ||
const input = fs.readFileSync(filename, 'utf-8').trimStart(); | ||
const normalizeEol = /\r/g; | ||
@@ -57,3 +57,4 @@ const normalizeEof = /\s*$(?!\n)/; | ||
const distFolder = makeDir.sync(settings.dist); | ||
const outputPath = slash(path.format({ dir: settings.dist, name: inputFile.name, ext: fileExt })); | ||
const formatOptions = { dir: settings.dist, name: inputFile.name, ext: fileExt }; | ||
const outputPath = slash(path.format(formatOptions)); | ||
const isMinified = outputPath.includes('.min.') || out4.indexOf('\n') === out4.length - 1; | ||
@@ -60,0 +61,0 @@ const spacerLines = isMinified || mlStyle ? '\n' : '\n\n'; |
{ | ||
"name": "add-dist-header", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Prepend a one-line banner comment (with license notice) to distribution files", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
16747
160