Skip to content

Commit

Permalink
docs: add license to undici-types (#2401)
Browse files Browse the repository at this point in the history
  • Loading branch information
dancastillo committed Nov 5, 2023
1 parent a054593 commit deccde6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/generate-undici-types-package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const packageJSONPath = path.join(__dirname, '..', 'package.json')
const packageJSONRaw = fs.readFileSync(packageJSONPath, 'utf-8')
const packageJSON = JSON.parse(packageJSONRaw)

const licensePath = path.join(__dirname, '..', 'LICENSE')
const licenseRaw = fs.readFileSync(licensePath, 'utf-8')

const packageTypesJSON = {
name: 'undici-types',
version: packageJSON.version,
Expand All @@ -19,5 +22,7 @@ const packageTypesJSON = {
}

const packageTypesPath = path.join(__dirname, '..', 'types', 'package.json')
const licenseTypesPath = path.join(__dirname, '..', 'types', 'LICENSE')

fs.writeFileSync(packageTypesPath, JSON.stringify(packageTypesJSON, null, 2))
fs.writeFileSync(licenseTypesPath, licenseRaw)

0 comments on commit deccde6

Please sign in to comment.