build: added some meta in package.json
This commit is contained in:
parent
28b2efbb08
commit
8df4c1a6b5
2 changed files with 24 additions and 0 deletions
15
package.json
15
package.json
|
@ -5,6 +5,21 @@
|
|||
"description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS",
|
||||
"license": "MIT",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"keywords": [
|
||||
"telegram",
|
||||
"telegram-api",
|
||||
"telegram-bot",
|
||||
"telegram-library",
|
||||
"mtproto",
|
||||
"tgbot",
|
||||
"userbot",
|
||||
"api"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mtcute/mtcute"
|
||||
},
|
||||
"homepage": "https://mtcute.dev",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
|
|
|
@ -5,6 +5,8 @@ const fs = require('fs')
|
|||
const glob = require('glob')
|
||||
const ts = require('typescript')
|
||||
const stc = require('@teidesu/slow-types-compiler')
|
||||
// @ts-ignore
|
||||
const rootPackageJson = require('../package.json')
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
console.log('Usage: build-package.js <package name>')
|
||||
|
@ -78,6 +80,13 @@ function buildPackageJson() {
|
|||
pkgJson.module = 'esm/index.js'
|
||||
}
|
||||
|
||||
// copy common fields from root
|
||||
for (const field of ['license', 'author', 'contributors', 'homepage', 'repository', 'bugs']) {
|
||||
if (rootPackageJson[field]) {
|
||||
pkgJson[field] = rootPackageJson[field]
|
||||
}
|
||||
}
|
||||
|
||||
const newScripts = {}
|
||||
|
||||
if (pkgJson.keepScripts) {
|
||||
|
|
Loading…
Reference in a new issue