@pure-ds/core 0.5.7 → 0.5.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.5.7",
4
+ "version": "0.5.8",
5
5
  "description": "Pure Design System - Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -260,6 +260,30 @@ async function runDevServer() {
260
260
  });
261
261
  }
262
262
 
263
+ async function ensurePdsAssets() {
264
+ const pdsAssetsDir = path.join(projectRoot, 'public', 'assets', 'pds');
265
+ if (existsSync(pdsAssetsDir)) {
266
+ log('↪️ PDS assets already present');
267
+ return;
268
+ }
269
+
270
+ const npmCmd = getNpmCommand();
271
+ log('🎨 Building PDS static assets (pds:build)...');
272
+
273
+ await new Promise((resolve, reject) => {
274
+ const child = spawn(npmCmd, ['run', 'pds:build'], {
275
+ cwd: projectRoot,
276
+ stdio: 'inherit',
277
+ shell: true
278
+ });
279
+
280
+ child.on('exit', (code) => {
281
+ if (code === 0) resolve();
282
+ else reject(new Error(`npm run pds:build exited with code ${code}`));
283
+ });
284
+ });
285
+ }
286
+
263
287
  async function main() {
264
288
  log('\n⚡ PDS Bootstrap\n');
265
289
 
@@ -281,6 +305,8 @@ async function main() {
281
305
  const esbuildDevContent = isModule ? buildEsbuildDevEsm() : buildEsbuildDevCjs();
282
306
  await writeFileIfMissing(esbuildDevPath, esbuildDevContent);
283
307
 
308
+ await ensurePdsAssets();
309
+
284
310
  log('\n✅ Bootstrap files ready.\n');
285
311
  await runDevServer();
286
312
  }