create-spfx-tailwind-app 1.0.10
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 +205 -0
- package/Template/.eslintrc.js +321 -0
- package/Template/.vscode/launch.json +23 -0
- package/Template/.vscode/settings.json +14 -0
- package/Template/.yo-rc.json +19 -0
- package/Template/README.md +190 -0
- package/Template/config/config.json +18 -0
- package/Template/config/deploy-azure-storage.json +7 -0
- package/Template/config/package-solution.json +40 -0
- package/Template/config/rig.json +7 -0
- package/Template/config/sass.json +5 -0
- package/Template/config/serve.json +6 -0
- package/Template/config/typescript.json +9 -0
- package/Template/config/write-manifests.json +4 -0
- package/Template/package-lock.json +21549 -0
- package/Template/package.json +60 -0
- package/Template/postcss.config.js +6 -0
- package/Template/setup.js +75 -0
- package/Template/src/tailwind.generated.css +559 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/__PROJECT_NAME__WebPart.manifest.json +28 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/__PROJECT_NAME__WebPart.ts +181 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/assets/welcome-dark.png +0 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/assets/welcome-light.png +0 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/components/I__PROJECT_NAME__Props.ts +12 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/components/__PROJECT_NAME__.tsx +9 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/loc/en-us.js +16 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/loc/mystrings.d.ts +19 -0
- package/Template/src/webparts/__PROJECT_NAME_LOWER__/tailwind.css +3 -0
- package/Template/tailwind.config.js +8 -0
- package/Template/teams/aa77f8d0-89f1-4335-816c-cb8bffa03b3c_color.png +0 -0
- package/Template/teams/aa77f8d0-89f1-4335-816c-cb8bffa03b3c_outline.png +0 -0
- package/Template/tsconfig.json +3 -0
- package/index.js +137 -0
- package/package.json +42 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# 🚀 create-spfx-tailwind-app
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
A modern CLI tool to scaffold **SharePoint Framework (SPFx)** projects
|
|
9
|
+
with **Tailwind CSS pre-configured** --- no manual setup required.
|
|
10
|
+
|
|
11
|
+
------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
## ✨ Features
|
|
14
|
+
|
|
15
|
+
- ⚡ One-command SPFx project creation\
|
|
16
|
+
- 🎨 Tailwind CSS ready out of the box\
|
|
17
|
+
- 🧠 Smart CLI (interactive prompts + flags)\
|
|
18
|
+
- 📦 Optional dependency installation\
|
|
19
|
+
- 🏗 Built for SPFx v1.22+ (Heft-based projects)\
|
|
20
|
+
- 🔁 No manual renaming required
|
|
21
|
+
|
|
22
|
+
------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
## 📦 Usage
|
|
25
|
+
|
|
26
|
+
### ▶️ Create a project
|
|
27
|
+
|
|
28
|
+
``` bash
|
|
29
|
+
npx create-spfx-tailwind-app MyProject
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
### ▶️ Or install globally
|
|
35
|
+
|
|
36
|
+
``` bash
|
|
37
|
+
npm install -g create-spfx-tailwind-app
|
|
38
|
+
create-spfx-app MyProject
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
## ⚙️ CLI Options
|
|
44
|
+
|
|
45
|
+
``` bash
|
|
46
|
+
create-spfx-app <project-name> [options]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Options
|
|
50
|
+
|
|
51
|
+
- `--no-install` → Skip dependency installation
|
|
52
|
+
|
|
53
|
+
### Example
|
|
54
|
+
|
|
55
|
+
``` bash
|
|
56
|
+
create-spfx-app VendorPortal --no-install
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
------------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
## 🛠 After Project Creation
|
|
62
|
+
|
|
63
|
+
### If you skipped install:
|
|
64
|
+
|
|
65
|
+
``` bash
|
|
66
|
+
cd MyProject
|
|
67
|
+
npm install
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
## ▶️ Start Development
|
|
73
|
+
|
|
74
|
+
Run in **two terminals**:
|
|
75
|
+
|
|
76
|
+
``` bash
|
|
77
|
+
# Terminal 1
|
|
78
|
+
npm run start
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
``` bash
|
|
82
|
+
# Terminal 2 (Tailwind watcher)
|
|
83
|
+
npm run build:tailwind
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
## 🧱 Tech Stack
|
|
89
|
+
|
|
90
|
+
- SharePoint Framework (SPFx) v1.22+
|
|
91
|
+
- React
|
|
92
|
+
- Tailwind CSS
|
|
93
|
+
- Heft build system
|
|
94
|
+
- Node.js
|
|
95
|
+
|
|
96
|
+
------------------------------------------------------------------------
|
|
97
|
+
|
|
98
|
+
## 📁 Project Structure
|
|
99
|
+
|
|
100
|
+
MyProject/
|
|
101
|
+
├── src/
|
|
102
|
+
├── config/
|
|
103
|
+
├── package.json
|
|
104
|
+
├── gulpfile.js
|
|
105
|
+
├── tailwind.config.js
|
|
106
|
+
|
|
107
|
+
------------------------------------------------------------------------
|
|
108
|
+
|
|
109
|
+
## 🎯 Why this tool?
|
|
110
|
+
|
|
111
|
+
The default SPFx generator:
|
|
112
|
+
|
|
113
|
+
``` bash
|
|
114
|
+
yo @microsoft/sharepoint
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
❌ Requires manual setup\
|
|
118
|
+
❌ No Tailwind support\
|
|
119
|
+
❌ Repetitive configuration
|
|
120
|
+
|
|
121
|
+
------------------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
This CLI solves that by:
|
|
124
|
+
|
|
125
|
+
✔ Automating setup\
|
|
126
|
+
✔ Adding Tailwind out of the box\
|
|
127
|
+
✔ Improving developer experience
|
|
128
|
+
|
|
129
|
+
------------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
## 📌 Prerequisites
|
|
132
|
+
|
|
133
|
+
- Node.js (v18 recommended)
|
|
134
|
+
- npm
|
|
135
|
+
- SPFx development environment
|
|
136
|
+
|
|
137
|
+
------------------------------------------------------------------------
|
|
138
|
+
|
|
139
|
+
## 🧪 Example
|
|
140
|
+
|
|
141
|
+
``` bash
|
|
142
|
+
npx create-spfx-tailwind-app VendorPortal
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
------------------------------------------------------------------------
|
|
146
|
+
|
|
147
|
+
## 🧑💻 Author
|
|
148
|
+
|
|
149
|
+
Deependra Singh
|
|
150
|
+
|
|
151
|
+
------------------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+
## 📄 License
|
|
154
|
+
|
|
155
|
+
MIT License
|
|
156
|
+
|
|
157
|
+
------------------------------------------------------------------------
|
|
158
|
+
|
|
159
|
+
## ⚠️ Disclaimer
|
|
160
|
+
|
|
161
|
+
This project is not officially affiliated with Microsoft.\
|
|
162
|
+
Use at your own risk.
|
|
163
|
+
|
|
164
|
+
------------------------------------------------------------------------
|
|
165
|
+
|
|
166
|
+
## ⭐ Contributing
|
|
167
|
+
|
|
168
|
+
Contributions are welcome!\
|
|
169
|
+
Feel free to open issues or submit pull requests.
|
|
170
|
+
|
|
171
|
+
------------------------------------------------------------------------
|
|
172
|
+
|
|
173
|
+
## 🔗 References
|
|
174
|
+
|
|
175
|
+
- https://learn.microsoft.com/sharepoint/dev/spfx/
|
|
176
|
+
- https://tailwindcss.com/
|
|
177
|
+
- https://heft.rushstack.io/
|
|
178
|
+
|
|
179
|
+
------------------------------------------------------------------------
|
|
180
|
+
|
|
181
|
+
## 💬 Support
|
|
182
|
+
|
|
183
|
+
If you find this useful:
|
|
184
|
+
|
|
185
|
+
⭐ Star the repo\
|
|
186
|
+
🔁 Share with your team
|
|
187
|
+
|
|
188
|
+
------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
Happy coding 🚀
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
|
|
3
|
+
"version": "2.0",
|
|
4
|
+
"bundles": {
|
|
5
|
+
"template-spfx-web-part": {
|
|
6
|
+
"components": [
|
|
7
|
+
{
|
|
8
|
+
"entrypoint": "./lib/webparts/__PROJECT_NAME_LOWER__/__PROJECT_NAME__WebPart.js",
|
|
9
|
+
"manifest": "./src/webparts/__PROJECT_NAME_LOWER__/__PROJECT_NAME__WebPart.manifest.json"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"externals": {},
|
|
15
|
+
"localizedResources": {
|
|
16
|
+
"TemplateSpfxWebPartStrings": "lib/webparts/__PROJECT_NAME_LOWER__/loc/{locale}.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
|
|
3
|
+
"solution": {
|
|
4
|
+
"name": "__PROJECT_NAME__-client-side-solution",
|
|
5
|
+
"id": "5ee544fa-223e-415c-a17c-3555c718f10d",
|
|
6
|
+
"version": "1.0.0.0",
|
|
7
|
+
"includeClientSideAssets": true,
|
|
8
|
+
"skipFeatureDeployment": true,
|
|
9
|
+
"isDomainIsolated": false,
|
|
10
|
+
"developer": {
|
|
11
|
+
"name": "",
|
|
12
|
+
"websiteUrl": "",
|
|
13
|
+
"privacyUrl": "",
|
|
14
|
+
"termsOfUseUrl": "",
|
|
15
|
+
"mpnId": "Undefined-1.22.2"
|
|
16
|
+
},
|
|
17
|
+
"metadata": {
|
|
18
|
+
"shortDescription": {
|
|
19
|
+
"default": "__PROJECT_NAME__ description"
|
|
20
|
+
},
|
|
21
|
+
"longDescription": {
|
|
22
|
+
"default": "__PROJECT_NAME__ description"
|
|
23
|
+
},
|
|
24
|
+
"screenshotPaths": [],
|
|
25
|
+
"videoUrl": "",
|
|
26
|
+
"categories": []
|
|
27
|
+
},
|
|
28
|
+
"features": [
|
|
29
|
+
{
|
|
30
|
+
"title": "__PROJECT_NAME__ Feature",
|
|
31
|
+
"description": "The feature that activates elements of the __PROJECT_NAME__ solution.",
|
|
32
|
+
"id": "a6af1389-ba38-489b-b24c-f2c36e5ed404",
|
|
33
|
+
"version": "1.0.0.0"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"paths": {
|
|
38
|
+
"zippedPackage": "solution/__PROJECT_NAME__.sppkg"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
// The "rig.json" file directs tools to look for their config files in an external package.
|
|
3
|
+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
|
|
4
|
+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
|
5
|
+
|
|
6
|
+
"rigPackageName": "@microsoft/spfx-web-build-rig"
|
|
7
|
+
}
|