Skip to content

Commit

Permalink
chore: fallback to root pkg info for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
yeojz committed Dec 30, 2019
1 parent 230bafd commit 6e9a070
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions configs/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/explicit-function-return-type */
const fs = require('fs');
const path = require('path');
const pkgRoot = require('../package.json');

function fileNameNoExt(file) {
return path.basename(file, path.extname(file));
Expand All @@ -27,9 +28,9 @@ function banner(pkg) {
return `/**
* ${pkg.name}
*
* @author ${pkg.author}
* @version: ${pkg.version}
* @license: ${pkg.license}
* @author ${pkg.author || pkgRoot.author}
* @version: ${pkg.version || pkgRoot.version}
* @license: ${pkg.license || pkgRoot.license}
**/`;
}

Expand Down

0 comments on commit 6e9a070

Please sign in to comment.