@idomatic/create 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +13 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -45,19 +45,28 @@ let pkg = "npm";
45
45
  if (agent.includes("yarn")) pkg = "yarn";
46
46
  else if (agent.includes("bun")) pkg = "bun";
47
47
 
48
- // Install parser
48
+ // Install parser if opted-in
49
49
  if (res.installParsers) {
50
50
  const parser =
51
51
  res.framework === "js" ? "@idomatic/parser-js" : "@idomatic/parser-html";
52
-
53
- const installCmd = {
52
+ const installParserCmd = {
54
53
  npm: `npm install ${parser}`,
55
54
  yarn: `yarn add ${parser}`,
56
55
  bun: `bun add ${parser}`,
57
56
  }[pkg];
58
57
 
59
58
  console.log(`📦 Installing ${parser} with ${pkg}...`);
60
- execSync(installCmd, { stdio: "inherit" });
59
+ execSync(installParserCmd, { stdio: "inherit" });
61
60
  }
62
61
 
62
+ // Install core package (always install it)
63
+ const installCoreCmd = {
64
+ npm: `npm install @idomatic/core`,
65
+ yarn: `yarn add @idomatic/core`,
66
+ bun: `bun add @idomatic/core`,
67
+ }[pkg];
68
+
69
+ console.log(`📦 Installing @idomatic/core with ${pkg}...`);
70
+ execSync(installCoreCmd, { stdio: "inherit" });
71
+
63
72
  console.log("🎉 You're ready to run: npx idomatic --init-scan");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idomatic/create",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "@idomatic/create": "./index.js"