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.js build / generate output
.nuxt .nuxt
dist
# Gatsby files # Gatsby files
.cache/ .cache/

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

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

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

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

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

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

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

@ -1,6 +1,7 @@
import fs from "fs"; import fs from "fs";
import path from "path"; 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 { InheritsInfo } from "./InheritsInfo";
import parsePackageName from "parse-package-name"; import parsePackageName from "parse-package-name";

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

@ -49,6 +49,9 @@ Please run the following command:
console.log(` console.log(`
Usage: package-inherit [command] [--recovery] 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: Commands:
update updates the package.json for all packages in a monorepo to match inheritance update updates the package.json for all packages in a monorepo to match inheritance