packages/backend,cli: revert publish config and remove postpack script requirement from image-build

This commit is contained in:
Patrik Oldsberg
2020-06-25 19:56:18 +02:00
parent d49e05e9e7
commit c06c7d7e6b
2 changed files with 5 additions and 9 deletions
+1 -8
View File
@@ -1,18 +1,13 @@
{
"name": "example-backend",
"version": "0.1.1-alpha.12",
"main": "src/index.ts",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"private": true,
"license": "Apache-2.0",
"engines": {
"node": ">=12"
},
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"scripts": {
"build": "backstage-cli backend:build",
"build-image": "backstage-cli backend:build-image example-backend",
@@ -20,8 +15,6 @@
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"clean": "backstage-cli clean",
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
+4 -1
View File
@@ -25,6 +25,7 @@ type LernaPackage = {
name: string;
private: boolean;
location: string;
scripts: Record<string, string>;
};
type FileEntry =
@@ -92,7 +93,9 @@ async function moveToDistWorkspace(
cwd: target.location,
});
// TODO(Rugvip): yarn pack doesn't call postpack, once the bug is fixed this can be removed
await run('yarn', ['postpack'], { cwd: target.location });
if (target.scripts.postpack) {
await run('yarn', ['postpack'], { cwd: target.location });
}
const outputDir = relativePath(paths.targetRoot, target.location);
const absoluteOutputPath = resolvePath(workspaceDir, outputDir);