diff --git a/configs/helpers.js b/configs/helpers.js index 52d201af..4b8009d0 100644 --- a/configs/helpers.js +++ b/configs/helpers.js @@ -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)); @@ -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} **/`; }