@egjs/build-helper
Advanced tools
Comparing version 0.0.3 to 0.0.4
19
index.js
@@ -0,7 +1,19 @@ | ||
const fs = require("fs"); | ||
const pkg = require(process.cwd() + "/package.json"); | ||
let copyright = `Copyright (c) ${pkg.author ? pkg.author.name || pkg.author : ""}`; | ||
try { | ||
const licenseFile = fs.readFileSync(process.cwd() + "/LICENSE", {encoding: "utf8"}); | ||
const result = licenseFile.match(/^copy.*$/img); | ||
if (result && result[0]) { | ||
copyright = result[0]; | ||
} | ||
} catch (e) {} | ||
const defaultBanner = `/* | ||
Copyright (c) year-present ${pkg.author} | ||
${copyright} | ||
name: ${pkg.name} | ||
license: ${pkg.license} | ||
author: ${pkg.author} | ||
author: ${pkg.author ? pkg.author.name || pkg.author : ""} | ||
repository: ${pkg.repository.url} | ||
@@ -41,3 +53,2 @@ version: ${pkg.version} | ||
const { | ||
year = new Date().getFullYear(), | ||
input, | ||
@@ -57,3 +68,3 @@ output, // string | string[] | ||
outputOptions, // other output options | ||
banner = defaultBanner.replace("year", year), | ||
banner = defaultBanner, | ||
} = options; | ||
@@ -60,0 +71,0 @@ const nextPlugins = plugins.concat([typescriptPlugin, minifyPlugin, replacePlugin]); |
{ | ||
"name": "@egjs/build-helper", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
6562
211
3