@pure-ds/core 0.5.12 → 0.5.14
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
|
@@ -32,6 +32,17 @@ function getNpmCommand() {
|
|
|
32
32
|
return process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
async function getPdsCoreVersion() {
|
|
36
|
+
try {
|
|
37
|
+
const pkgPath = path.join(projectRoot, 'node_modules', '@pure-ds', 'core', 'package.json');
|
|
38
|
+
const raw = await readFile(pkgPath, 'utf8');
|
|
39
|
+
const pkg = JSON.parse(raw);
|
|
40
|
+
return pkg?.version || 'unknown';
|
|
41
|
+
} catch {
|
|
42
|
+
return 'unknown';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
35
46
|
async function readPackageJson() {
|
|
36
47
|
const pkgPath = path.join(projectRoot, 'package.json');
|
|
37
48
|
const raw = await readFile(pkgPath, 'utf8');
|
|
@@ -312,12 +323,9 @@ document.body.appendChild(settingsBtn);
|
|
|
312
323
|
|
|
313
324
|
const drawer = document.createElement('pds-drawer');
|
|
314
325
|
drawer.setAttribute('position', 'right');
|
|
315
|
-
drawer.innerHTML =
|
|
316
|
-
<div slot="drawer-header">Settings</div>
|
|
317
|
-
<div slot="drawer-content">
|
|
318
|
-
<my-theme></my-theme>
|
|
319
|
-
</div>
|
|
320
|
-
`;
|
|
326
|
+
drawer.innerHTML =
|
|
327
|
+
'<div slot="drawer-header">Settings</div>' +
|
|
328
|
+
'<div slot="drawer-content"><my-theme></my-theme></div>';
|
|
321
329
|
document.body.appendChild(drawer);
|
|
322
330
|
|
|
323
331
|
settingsBtn.addEventListener('click', () => {
|