Skip to content

Commit c2b724e

Browse files
committed
Fix build issues
1 parent 051742d commit c2b724e

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

config/tsconfig.template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"extends": "pebblekit-ts/config/tsconfig.json",
3-
"include": ["src/ts/**/*", "node_modules/pebblekit-ts/lib/**/*"]
2+
"extends": "pkts/config/tsconfig.json",
3+
"include": ["src/ts/**/*", "node_modules/pkts/lib/**/*"]
44
}

rollup.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default {
1212
"termost",
1313
"path",
1414
"fs",
15+
"url",
1516
"@rollup/plugin-typescript",
1617
"@rollup/plugin-node-resolve",
1718
"@rollup/plugin-babel",

src/commands/doctor.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export const checks: DoctorCheck[] = [
2525
);
2626

2727
const hasPebbkitDependency =
28-
packageJsonContent.dependencies?.["pebblekit-ts"] ||
29-
packageJsonContent.devDependencies?.["pebblekit-ts"];
28+
packageJsonContent.dependencies?.[pkg.name] ||
29+
packageJsonContent.devDependencies?.[pkg.name];
3030

3131
if (!hasPebbkitDependency) {
32-
return "pebblekit-ts is not listed as a dependency";
32+
return `${pkg.name} is not listed as a dependency`;
3333
}
3434

3535
const buildScript = packageJsonContent.scripts?.build;
@@ -46,14 +46,14 @@ export const checks: DoctorCheck[] = [
4646
);
4747

4848
const hasPebbkitDependency =
49-
packageJsonContent.dependencies?.["pebblekit-ts"] ||
50-
packageJsonContent.devDependencies?.["pebblekit-ts"];
49+
packageJsonContent.dependencies?.[pkg.name] ||
50+
packageJsonContent.devDependencies?.[pkg.name];
5151

5252
if (!hasPebbkitDependency) {
5353
if (!packageJsonContent.dependencies) {
5454
packageJsonContent.dependencies = {};
5555
}
56-
packageJsonContent.dependencies["pebblekit-ts"] = `^${pkg.version}`;
56+
packageJsonContent.dependencies[pkg.name] = `^${pkg.version}`;
5757
console.log(
5858
helpers.format(
5959
`Make sure to run "npm i" before building your project!!`,

src/util.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import path from "path";
2+
import { fileURLToPath } from "url";
23

34
export const projectDir = process.cwd();
4-
export const pktsDir = path.join(projectDir, "node_modules", "pebblekit-ts");
5+
export const pktsDir = path.join(
6+
path.dirname(fileURLToPath(import.meta.url)),
7+
".."
8+
);

0 commit comments

Comments
 (0)