From 4a9f2a4242a6acae22b4a5490dfb661c855dd3da Mon Sep 17 00:00:00 2001 From: Laurentiu Ciobanu Date: Tue, 31 Aug 2021 08:15:51 +0000 Subject: [PATCH] ci: add README to package --- package.json | 2 ++ src/scripts/build.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package.json b/package.json index 5823964..0e3e06b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,9 @@ "license": "MIT", "description": "Generate Kubernetes YAMLs with code instead of templates.", "homepage": "https://kubernate.dev", + "readme": "README.md", "files": [ + "README.md", "dist/**.js", "dist/**.d.ts" ], diff --git a/src/scripts/build.ts b/src/scripts/build.ts index f3f481c..99cccfa 100644 --- a/src/scripts/build.ts +++ b/src/scripts/build.ts @@ -2,6 +2,7 @@ import {writeFileSync} from "fs"; import {join as pathJoin} from "path"; const packageJson = require("../../package.json"); const rimraf = require("rimraf"); +import {cp} from "shelljs"; const preparePackage = (input: any) => { const VERSION = process.env["KUBERNATE_VERSION"] ?? process.argv.pop(); @@ -20,6 +21,7 @@ const preparePackage = (input: any) => { }; writeFileSync(pathJoin(__dirname, "../../dist/package.json"), JSON.stringify(preparePackage(packageJson), null, 4)); +cp("README.md", "dist/README.md"); rimraf("dist/scripts", () => {}); rimraf("dist/generator", () => {}); rimraf("dist/**.d.ts.map", () => {});