@unlaxer/dxe-suite 0.1.5 → 0.1.7

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/bin/dxe.js +6 -5
  2. package/package.json +1 -1
package/bin/dxe.js CHANGED
@@ -82,9 +82,10 @@ const cleanArgs = rawArgs.filter(a => !a.startsWith('--lang='));
82
82
  const [command, ...targets_] = cleanArgs;
83
83
  const targets = targets_.length > 0 ? targets_ : Object.keys(TOOLKITS);
84
84
 
85
- function run(cmd) {
85
+ function run(cmd, extraEnv) {
86
86
  console.log(`\n → ${cmd}`);
87
- execSync(cmd, { stdio: 'inherit' });
87
+ const env = extraEnv ? { ...process.env, ...extraEnv } : undefined;
88
+ execSync(cmd, { stdio: 'inherit', ...(env && { env }) });
88
89
  }
89
90
 
90
91
  if (command === 'install') {
@@ -93,8 +94,8 @@ if (command === 'install') {
93
94
  const tk = TOOLKITS[name];
94
95
  if (!tk) { console.error(M.unknownToolkit(name)); process.exit(1); }
95
96
  console.log(M.installing(name.toUpperCase()));
96
- run(`npm install ${tk.pkg}`);
97
- run(`npx ${tk.install} --lang=${lang}`);
97
+ run(`npm install ${tk.pkg}@latest`);
98
+ run(`npx ${tk.install}`, { DXE_LANG: lang });
98
99
  installed.push(tk);
99
100
  }
100
101
  console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
@@ -108,7 +109,7 @@ if (command === 'install') {
108
109
  if (!tk) { console.error(M.unknownToolkit(name)); process.exit(1); }
109
110
  console.log(M.updating(name.toUpperCase()));
110
111
  run(`npm install ${tk.pkg}@latest`);
111
- run(`npx ${tk.update} --lang=${lang}`);
112
+ run(`npx ${tk.update}`, { DXE_LANG: lang });
112
113
  }
113
114
  } else if (command === 'status') {
114
115
  for (const [name, tk] of Object.entries(TOOLKITS)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unlaxer/dxe-suite",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "DxE Suite — DGE / DDE / DRE toolkit を一括インストール・管理するスイートパッケージ",
5
5
  "license": "MIT",
6
6
  "repository": {