create-mendix-widget-gleam 2.0.4 → 2.0.6
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.
- package/package.json +1 -1
- package/src/index.mjs +31 -0
- package/template/gleam.toml +1 -1
- package/template/package.json +2 -1
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -132,6 +132,37 @@ export async function main(args) {
|
|
|
132
132
|
console.error(` ${CYAN}${pmConfig.install}${RESET}\n`);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
// Playwright Chromium 브라우저 설치 (미설치 시에만)
|
|
136
|
+
try {
|
|
137
|
+
const chromiumExists =
|
|
138
|
+
execSync(
|
|
139
|
+
`node -e "const fs=require('fs'),pw=require('playwright');process.stdout.write(String(fs.existsSync(pw.chromium.executablePath())))"`,
|
|
140
|
+
{ cwd: targetDir, encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"] },
|
|
141
|
+
).trim() === "true";
|
|
142
|
+
|
|
143
|
+
if (!chromiumExists) {
|
|
144
|
+
console.log(`\n${BOLD}Playwright Chromium 설치 중...${RESET}\n`);
|
|
145
|
+
try {
|
|
146
|
+
execSync("npx playwright install chromium", {
|
|
147
|
+
cwd: targetDir,
|
|
148
|
+
stdio: "inherit",
|
|
149
|
+
});
|
|
150
|
+
console.log(`\n${GREEN}✓${RESET} Playwright Chromium 설치 완료`);
|
|
151
|
+
} catch {
|
|
152
|
+
console.error(
|
|
153
|
+
`\n${YELLOW}⚠ Playwright 브라우저 설치 실패. 프로젝트 디렉토리에서 직접 실행하세요:${RESET}`,
|
|
154
|
+
);
|
|
155
|
+
console.error(
|
|
156
|
+
` ${CYAN}npx playwright install chromium${RESET}\n`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
console.log(`${GREEN}✓${RESET} Playwright Chromium 이미 설치됨`);
|
|
161
|
+
}
|
|
162
|
+
} catch {
|
|
163
|
+
// playwright 패키지 미설치 시 무시
|
|
164
|
+
}
|
|
165
|
+
|
|
135
166
|
// 프로덕션 빌드
|
|
136
167
|
console.log(`\n${BOLD}위젯 빌드 중...${RESET}\n`);
|
|
137
168
|
try {
|
package/template/gleam.toml
CHANGED
package/template/package.json
CHANGED