Skip to content

Commit 61acd24

Browse files
committed
🔨 Include package json in tarbal
1 parent d0c6ffe commit 61acd24

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Repo
22
.tmp/
3+
plugin_packages/
34

45
# Logs
56
logs

packages/publisher/src/publish.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,18 @@ export default function publishPackages(path: string, authToken: string) {
4141
const packageName = `@codeshift/mod-${dir
4242
.replace('@', '')
4343
.replace('/', '__')}`;
44-
const packageJson = await fs.readFile(`${path}/${dir}/package.json`);
45-
const distPath = `${path}/${dir}/dist`;
46-
const tarballPath = `${path}/${dir}/tarball.tgz`;
44+
const packagePath = `${path}/${dir}`;
45+
const packageJson = await fs.readFile(`${packagePath}/package.json`);
46+
const tarballPath = `${packagePath}/tarball.tgz`;
4747

48-
await tar.create({ cwd: distPath, file: tarballPath, gzip: true }, ['.']);
48+
await tar.create(
49+
{
50+
cwd: packagePath,
51+
file: tarballPath,
52+
gzip: true,
53+
},
54+
['.'],
55+
);
4956

5057
return publishPackage(packageName, {
5158
// @ts-ignore

0 commit comments

Comments
 (0)