fsdcats 0.0.0-stage → 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.
- package/README.md +62 -2
- package/all-practicals.txt +905 -0
- package/bin/cli.js +81 -0
- package/index.js +10 -0
- package/lib/generator.js +97 -0
- package/lib/practicalsData.js +762 -0
- package/package.json +23 -4
- package/practical-1.txt +110 -0
- package/practical-2.txt +118 -0
- package/practical-3.txt +174 -0
- package/practical-4.txt +180 -0
- package/practical-5.txt +203 -0
- package/practical-crud.txt +84 -0
- package/practicals/crud-operations/server.js +55 -0
- package/practicals/p1-vue-directives/App.vue +59 -0
- package/practicals/p1-vue-directives/users.json +5 -0
- package/practicals/p2-props-emits/App.vue +53 -0
- package/practicals/p2-props-emits/DriverCard.vue +20 -0
- package/practicals/p3-file-upload/App.vue +67 -0
- package/practicals/p3-file-upload/server.js +61 -0
- package/practicals/p4-pinia-form/App.vue +54 -0
- package/practicals/p4-pinia-form/server.js +35 -0
- package/practicals/p4-pinia-form/store.js +39 -0
- package/practicals/p5-nuxt-routing/app.vue +6 -0
- package/practicals/p5-nuxt-routing/layouts/default.vue +21 -0
- package/practicals/p5-nuxt-routing/layouts/minimal.vue +9 -0
- package/practicals/p5-nuxt-routing/pages/about.vue +14 -0
- package/practicals/p5-nuxt-routing/pages/index.vue +8 -0
- package/practicals/p5-nuxt-routing/pages/items/[id].vue +32 -0
- package/practicals/p5-nuxt-routing/pages/items/index.vue +22 -0
package/README.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Fullstack Practical Exam Cheatsheet (fsdcats)
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This package generates **clean text files (`.txt`)** containing the **step-by-step terminal setup instructions** and the **exact minimal component code** (separated by clean headers and gaps) for your Fullstack practical exam.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📚 Scope Covered
|
|
8
|
+
|
|
9
|
+
1. **Practical 1: Vue Directives** (`v-if`, `v-else`, `v-model`, `v-show`, `v-for`, `v-on`) ➔ `practical-1.txt`
|
|
10
|
+
2. **Practical 2: Data Binding (Props and Emits)** (Parent-to-Child & Child-to-Parent) ➔ `practical-2.txt`
|
|
11
|
+
3. **Practical 3: Document Upload & Preview (Vue 3 + Express + Multer)** ➔ `practical-3.txt`
|
|
12
|
+
4. **Practical 4: Localized State Management (Pinia Multi-Step Form)** ➔ `practical-4.txt`
|
|
13
|
+
5. **Practical 5: Routing in Nuxt and Shared Layouts** (`pages/`, `[id].vue`, `layouts/default.vue`) ➔ `practical-5.txt`
|
|
14
|
+
6. **CRUD Operations: Express + Mongoose REST API** (Create, Read, Update, Delete) ➔ `practical-crud.txt`
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## ⚡ How to Use fsdcats
|
|
19
|
+
|
|
20
|
+
Whenever you run the command for any practical, **a formatted `.txt` file is generated and automatically opened in your text editor**.
|
|
21
|
+
|
|
22
|
+
### 1. Generate via npx (Zero Installation)
|
|
23
|
+
```bash
|
|
24
|
+
npx fsdcats 1 # Generates & opens practical-1.txt
|
|
25
|
+
npx fsdcats 2 # Generates & opens practical-2.txt
|
|
26
|
+
npx fsdcats 3 # Generates & opens practical-3.txt
|
|
27
|
+
npx fsdcats 4 # Generates & opens practical-4.txt
|
|
28
|
+
npx fsdcats 5 # Generates & opens practical-5.txt
|
|
29
|
+
npx fsdcats crud # Generates & opens practical-crud.txt
|
|
30
|
+
npx fsdcats all # Generates ALL practical text files at once!
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Interactive Menu
|
|
34
|
+
Just run:
|
|
35
|
+
```bash
|
|
36
|
+
npx fsdcats
|
|
37
|
+
```
|
|
38
|
+
And select a number from `1` to `5`, `crud`, or `all`.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 📄 Structure of the Generated Text Files
|
|
43
|
+
|
|
44
|
+
Each generated `.txt` file contains:
|
|
45
|
+
1. **SECTION 1: STEP-BY-STEP PROJECT SETUP**
|
|
46
|
+
- Exact terminal commands (`npm create vue@latest ...`, `cd ...`, `npm install`, `npm run dev`).
|
|
47
|
+
- Every single prompt choice (e.g. selecting `No` for TypeScript, ESLint, Prettier to avoid exam errors).
|
|
48
|
+
2. **SECTION 2: COMPONENT CODE FILES**
|
|
49
|
+
- Clearly separated by visible spacing/gaps.
|
|
50
|
+
- Component Name & target file path (e.g., `COMPONENT NAME: App.vue`, `TARGET PATH: src/App.vue`).
|
|
51
|
+
- Clean, minimal code ready to copy-paste.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🚀 How to Publish to npm
|
|
56
|
+
|
|
57
|
+
In your terminal (inside `/Users/spare/Downloads/fullstack`), run:
|
|
58
|
+
```bash
|
|
59
|
+
npm publish --access public --otp=YOUR_6_DIGIT_OTP
|
|
60
|
+
```
|
|
61
|
+
*(Replace `YOUR_6_DIGIT_OTP` with the active code from your authenticator app).*
|
|
62
|
+
|
|
63
|
+
Once published, you or your friends can run `npx fsdcats 1` on **any computer in the world**!
|