@webmate-studio/builder 0.2.32 → 0.2.34

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/build-service.js +12 -6
  2. package/package.json +1 -1
package/build-service.js CHANGED
@@ -346,9 +346,15 @@ const server = http.createServer(async (req, res) => {
346
346
  });
347
347
  });
348
348
 
349
- server.listen(PORT, () => {
350
- console.log(`[Build Service] Running on http://localhost:${PORT}`);
351
- console.log(`[Build Service] Endpoints:`);
352
- console.log(` POST /css/generate - Generate Tailwind CSS`);
353
- console.log(` POST /build - Build component (islands + CSS)`);
354
- });
349
+ // Only start server if this file is run directly (not imported)
350
+ if (import.meta.url === `file://${process.argv[1]}`) {
351
+ server.listen(PORT, () => {
352
+ console.log(`[Build Service] Running on http://localhost:${PORT}`);
353
+ console.log(`[Build Service] Endpoints:`);
354
+ console.log(` POST /css/generate - Generate Tailwind CSS`);
355
+ console.log(` POST /build - Build component (islands + CSS)`);
356
+ });
357
+ }
358
+
359
+ // Export for programmatic usage
360
+ export { buildComponent, generateComponentCSS };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmate-studio/builder",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [