This commit is contained in:
Ken Chau 2020-09-01 14:47:12 -07:00
Родитель a73fe36430
Коммит 21ee9b8519
6 изменённых файлов: 36724 добавлений и 8 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -80,7 +80,6 @@ typings/
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/

36713
dist/package-inherit.js поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -5,7 +5,8 @@
"license": "MIT",
"scripts": {
"build": "cross-env NODE_ENV=production rollup -c",
"start": "rollup -c -w"
"start": "rollup -c -w",
"release": "yarn build && yarn publish"
},
"dependencies": {
"workspace-tools": "^0.9.4",
@ -26,4 +27,4 @@
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-external-globals": "^0.6.0"
}
}
}

Просмотреть файл

@ -7,15 +7,14 @@ import progress from "rollup-plugin-progress";
export default {
input: "src/index.ts",
output: {
dir: "dist",
format: "cjs",
file: "dist/package-inherit.js"
},
plugins: [
typescript(),
nodeExternals(),
...(process.env.NODE_ENV === "production" ? [nodeResolve()] : []),
nodeResolve(),
commonjs(),
progress(),
],
]
};

Просмотреть файл

@ -1,6 +1,7 @@
import fs from "fs";
import path from "path";
import { getPackageInfos, PackageInfos } from "workspace-tools";
import { getPackageInfos } from "workspace-tools/lib/getPackageInfos";
import { PackageInfos } from "workspace-tools/lib/types/PackageInfo";
import { InheritsInfo } from "./InheritsInfo";
import parsePackageName from "parse-package-name";

Просмотреть файл

@ -49,6 +49,9 @@ Please run the following command:
console.log(`
Usage: package-inherit [command] [--recovery]
This utility will update package.json in a monorepo to inherit from another package.json template.
Currently, only "scripts", "devDependencies", and "dependencies" are merged into the package.json
Commands:
update updates the package.json for all packages in a monorepo to match inheritance