casper-context 0.1.0 → 0.1.2
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 +7 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ function MessageBox() {
|
|
|
84
84
|
|
|
85
85
|
That’s it. Under the hood, the plugin rewrites your code to use the native React Context API. It is 100% React-compliant at runtime.
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
## ✨ Features
|
|
88
88
|
|
|
89
89
|
- **Zero Boilerplate:** No more createContext, useContext, or wrapping components manually.
|
|
90
90
|
- **Automatic Reactivity:** When a casper variable changes, all components using it re-render automatically..
|
|
@@ -92,12 +92,12 @@ That’s it. Under the hood, the plugin rewrites your code to use the native Rea
|
|
|
92
92
|
- **Native Performance:** Since it compiles to the native React Context API, there is zero overhead compared to writing Context manually.
|
|
93
93
|
- **Standard Syntax:** Use familiar assignment syntax to update global state.
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
## 📦 Installation
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
98
|
npm install casper-context --save-dev
|
|
99
99
|
```
|
|
100
|
-
|
|
100
|
+
## ⚙️ Setup
|
|
101
101
|
|
|
102
102
|
#### 1️⃣ Add Babel Plugin
|
|
103
103
|
Add it to your `.babelrc` or `babel.config.js`
|
|
@@ -133,7 +133,7 @@ globals: {
|
|
|
133
133
|
}
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
## 🔧 Custom Configuration
|
|
137
137
|
|
|
138
138
|
By default, the plugin identifies variables using the `_$_` prefix.
|
|
139
139
|
|
|
@@ -238,7 +238,7 @@ If you are still having trouble, enable debug mode in your `.casperctxrc.json`
|
|
|
238
238
|
```
|
|
239
239
|
This will generate a `.casperctx.debug.log` file in your project root, detailing exactly how the plugin is mapping your variables.
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
## 🗺 Roadmap
|
|
242
242
|
- ✅ CRA Support
|
|
243
243
|
- ✅ Babel + Webpack Support
|
|
244
244
|
- 🚧 Vite Integration
|
|
@@ -246,8 +246,8 @@ This will generate a `.casperctx.debug.log` file in your project root, detailing
|
|
|
246
246
|
- 🚧 TypeScript Improvements
|
|
247
247
|
- 🚧 Developer Tools Integration
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
## 🤝 Contributing
|
|
250
250
|
Contributions, suggestions, and issues are welcome.
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
## 📜 License
|
|
253
253
|
MIT License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "casper-context",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CasperContext - the friendly, invisible React Context API via Babel. Declare a variable, use it globally.",
|
|
5
5
|
"author": "Ruwan Chamara",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
],
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/rchamara/casper-context"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
|
-
"url": "https://github.com/
|
|
33
|
+
"url": "https://github.com/rchamara/casper-context/issues"
|
|
34
34
|
},
|
|
35
|
-
"homepage": "https://github.com/
|
|
35
|
+
"homepage": "https://github.com/rchamara/casper-context#readme",
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "babel src --out-dir dist --extensions .ts,.js",
|
|
38
38
|
"dev": "babel src --out-dir dist --extensions .ts,.js --watch",
|