create-spfx-tailwind-app 1.0.10 → 1.0.12

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/Readme.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ### Create a new SPFx project
4
4
 
5
5
 
6
- npx create-spfx-tailwind-app-v1 MyProject
6
+ npx create-spfx-tailwind-app MyProject
7
7
 
8
8
  ![npm version](https://img.shields.io/npm/v/create-spfx-tailwind-app-v1)
9
9
  ![npm downloads](https://img.shields.io/npm/dt/create-spfx-tailwind-app-v1)
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3
3
  "solution": {
4
4
  "name": "__PROJECT_NAME__-client-side-solution",
5
- "id": "5ee544fa-223e-415c-a17c-3555c718f10d",
5
+ "id": "__SOLUTION_ID__",
6
6
  "version": "1.0.0.0",
7
7
  "includeClientSideAssets": true,
8
8
  "skipFeatureDeployment": true,
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "__PROJECT_NAME_LOWER__",
3
- "version": "0.0.1",
2
+ "name": "template-spfx",
3
+ "version": "0.0.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
- "name": "__PROJECT_NAME_LOWER__",
9
- "version": "0.0.1",
8
+ "name": "template-spfx",
9
+ "version": "0.0.2",
10
10
  "dependencies": {
11
11
  "@fluentui/react": "^8.106.4",
12
12
  "@microsoft/sp-component-base": "1.22.2",
@@ -18,7 +18,8 @@
18
18
  "jquery": "^4.0.0",
19
19
  "react": "17.0.1",
20
20
  "react-dom": "17.0.1",
21
- "tslib": "2.3.1"
21
+ "tslib": "2.3.1",
22
+ "uuid": "^14.0.0"
22
23
  },
23
24
  "devDependencies": {
24
25
  "@microsoft/eslint-config-spfx": "1.22.2",
@@ -4626,6 +4627,21 @@
4626
4627
  "@rushstack/heft": "^1.1.2"
4627
4628
  }
4628
4629
  },
4630
+ "node_modules/@microsoft/spfx-heft-plugins/node_modules/uuid": {
4631
+ "version": "9.0.1",
4632
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
4633
+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
4634
+ "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).",
4635
+ "dev": true,
4636
+ "funding": [
4637
+ "https://github.com/sponsors/broofa",
4638
+ "https://github.com/sponsors/ctavan"
4639
+ ],
4640
+ "license": "MIT",
4641
+ "bin": {
4642
+ "uuid": "dist/bin/uuid"
4643
+ }
4644
+ },
4629
4645
  "node_modules/@microsoft/spfx-web-build-rig": {
4630
4646
  "version": "1.22.2",
4631
4647
  "resolved": "https://registry.npmjs.org/@microsoft/spfx-web-build-rig/-/spfx-web-build-rig-1.22.2.tgz",
@@ -20553,17 +20569,16 @@
20553
20569
  }
20554
20570
  },
20555
20571
  "node_modules/uuid": {
20556
- "version": "9.0.1",
20557
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
20558
- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
20559
- "dev": true,
20572
+ "version": "14.0.0",
20573
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz",
20574
+ "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==",
20560
20575
  "funding": [
20561
20576
  "https://github.com/sponsors/broofa",
20562
20577
  "https://github.com/sponsors/ctavan"
20563
20578
  ],
20564
20579
  "license": "MIT",
20565
20580
  "bin": {
20566
- "uuid": "dist/bin/uuid"
20581
+ "uuid": "dist-node/bin/uuid"
20567
20582
  }
20568
20583
  },
20569
20584
  "node_modules/v8-to-istanbul": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "template-spfx",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": true,
5
5
  "engines": {
6
6
  "node": ">=22.14.0 < 23.0.0"
@@ -26,7 +26,8 @@
26
26
  "jquery": "^4.0.0",
27
27
  "react": "17.0.1",
28
28
  "react-dom": "17.0.1",
29
- "tslib": "2.3.1"
29
+ "tslib": "2.3.1",
30
+ "uuid": "^14.0.0"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@microsoft/eslint-config-spfx": "1.22.2",
package/Template/setup.js CHANGED
@@ -1,5 +1,9 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
+ const { v4: uuidv4 } = require("uuid");
4
+
5
+ const solutionId = uuidv4();
6
+ const webpartId = uuidv4();
3
7
 
4
8
  const projectName = process.argv[2];
5
9
 
@@ -16,7 +20,9 @@ function replaceInFile(filePath) {
16
20
 
17
21
  content = content
18
22
  .replace(/__PROJECT_NAME__/g, projectName)
19
- .replace(/__PROJECT_NAME_LOWER__/g, projectNameLower);
23
+ .replace(/__PROJECT_NAME_LOWER__/g, projectNameLower)
24
+ .replace(/__WEBPART_ID__/g, webpartId)
25
+ .replace(/__SOLUTION_ID__/g, solutionId);
20
26
 
21
27
  fs.writeFileSync(filePath, content);
22
28
  }
@@ -59,6 +65,16 @@ function renameFiles(dir) {
59
65
  // 🔁 Run replacements
60
66
  walk("./");
61
67
 
68
+ const pkgPath = path.join("./package.json");
69
+
70
+ if (fs.existsSync(pkgPath)) {
71
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
72
+
73
+ pkg.name = projectNameLower; // force update
74
+
75
+ fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
76
+ }
77
+
62
78
  // 🔁 Rename files AFTER replacing content
63
79
  renameFiles("./");
64
80
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=22"
5
5
  },
6
- "version": "1.0.10",
6
+ "version": "1.0.12",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "test": "echo \"Error: no test specified\" && exit 1"