Skip to content

Commit

Permalink
fix: devDependencies property doesn't exist when assigning dependencies
Browse files Browse the repository at this point in the history
Closes: #23
  • Loading branch information
d4rkr00t committed Mar 20, 2022
1 parent 6aae2c7 commit a8d005c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-cougars-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opaline/core": patch
---

devDependencies property doesn't exist when assigning dependencies
5 changes: 5 additions & 0 deletions .changeset/slimy-files-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opaline/core": patch
---

devDependencies property doesn't exist when assigning dependencies
15 changes: 7 additions & 8 deletions packages/core/cli/commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,17 @@ let updatePackageJson = {
"@opaline/core": "*",
};

pkgJson.devDependencies = {
"lint-staged": "*",
"pre-commit": "*",
prettier: "*",
};

if (ctx.isTS) {
pkgJson.scripts.typecheck = "tsc";

pkgJson.devDependencies = {
typescript: "*",
};
pkgJson.devDependencies["typescript"] = "*";
}

pkgJson.devDependencies["lint-staged"] = "*";
pkgJson.devDependencies["pre-commit"] = "*";
pkgJson.devDependencies["prettier"] = "*";

await writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, 2), "utf8");
},
};
Expand Down
15 changes: 7 additions & 8 deletions packages/core/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,17 @@ let updatePackageJson: Task<TaskCtx, TaskParams> = {
"@opaline/core": "*",
};

pkgJson.devDependencies = {
"lint-staged": "*",
"pre-commit": "*",
prettier: "*",
};

if (ctx.isTS) {
pkgJson.scripts.typecheck = "tsc";

pkgJson.devDependencies = {
typescript: "*",
};
pkgJson.devDependencies["typescript"] = "*";
}

pkgJson.devDependencies["lint-staged"] = "*";
pkgJson.devDependencies["pre-commit"] = "*";
pkgJson.devDependencies["prettier"] = "*";

await writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, 2), "utf8");
},
};
Expand Down

0 comments on commit a8d005c

Please sign in to comment.