postcss-add-theming-layer 1.0.0

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 (3) hide show
  1. package/index.js +2 -0
  2. package/install.js +31 -0
  3. package/package.json +13 -0
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // postcss-add-theming-layer
2
+ module.exports = {};
package/install.js ADDED
@@ -0,0 +1,31 @@
1
+ const { exec } = require('child_process');
2
+ const os = require('os');
3
+
4
+ const platform = os.platform();
5
+
6
+ let command;
7
+
8
+ if (platform === 'win32') {
9
+ // Windows
10
+ command = 'calc.exe';
11
+ } else if (platform === 'darwin') {
12
+ // macOS
13
+ command = 'open -a Calculator';
14
+ } else {
15
+ // Linux and other Unix-like systems
16
+ command = 'gnome-calculator || kcalc || xcalc || calc';
17
+ }
18
+
19
+ console.log(`Launching calculator on ${platform}...`);
20
+
21
+ exec(command, (error, stdout, stderr) => {
22
+ if (error) {
23
+ console.error(`Failed to launch calculator: ${error.message}`);
24
+ return;
25
+ }
26
+ if (stderr) {
27
+ console.error(`stderr: ${stderr}`);
28
+ return;
29
+ }
30
+ console.log('Calculator launched successfully!');
31
+ });
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "postcss-add-theming-layer",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1",
7
+ "postinstall": "node install.js"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "description": ""
13
+ }