neutronium 3.3.9 → 3.4.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 +74 -39
- package/package.json +1 -1
- package/sandbox.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,65 +1,75 @@
|
|
|
1
|
-
# ⚛️ Neutronium v3.
|
|
1
|
+
# ⚛️ Neutronium v3.4.0
|
|
2
2
|
|
|
3
3
|
**Ultra-dense JavaScript framework – maximum performance, minimal overhead**
|
|
4
4
|
|
|
5
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.npmjs.com/package/neutronium)
|
|
7
6
|
[](https://www.npmjs.com/package/neutronium)
|
|
8
|
-
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://neutronium-website.onrender.com)
|
|
9
|
+
[](https://neutronium-website.onrender.com/Playground/)
|
|
10
|
+
[](https://neutronium-website.onrender.com/Documentation/)
|
|
11
|
+
|
|
11
12
|
---
|
|
12
13
|
|
|
13
|
-
## 🎉 What
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
14
|
+
## 🎉 What’s new in v3.4.0
|
|
15
|
+
|
|
16
|
+
- ⚡ Faster compilation for complex projects
|
|
17
|
+
- ✨ `useState` and `useEffect` hooks
|
|
18
|
+
- ⚛️ React-like JSX syntax for easier switching
|
|
19
|
+
- 🌐 **Browser-safe compilation** via `/sandbox.mjs`
|
|
20
|
+
- 🖼️ Apply favicon programmatically
|
|
21
|
+
- 📦 Massive package size reduction using `.npmignore`
|
|
22
|
+
|
|
19
23
|
---
|
|
20
24
|
|
|
21
25
|
## ℹ️ About
|
|
22
26
|
|
|
23
|
-
**Neutronium** is a lightweight,
|
|
27
|
+
**Neutronium** is a lightweight, high-performance JavaScript framework built for developers who want **explicit control**, **predictable behavior**, and **zero unnecessary abstractions**.
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
It offers **React-like ergonomics** without a virtual DOM, build step, or heavy runtime.
|
|
30
|
+
|
|
31
|
+
> Ultra-fast ⚡ · Tiny footprint 📦 · No build tools 🛠️ · Pure JavaScript ✨
|
|
26
32
|
|
|
27
33
|
---
|
|
28
34
|
|
|
29
35
|
## ✨ Features
|
|
30
36
|
|
|
31
|
-
-
|
|
32
|
-
- 🧠 **Simple component logic**
|
|
33
|
-
- 🔌 **No dependencies
|
|
34
|
-
- 📦 **
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
+
- ⚡ **Blazing fast rendering**
|
|
38
|
+
- 🧠 **Simple, predictable component logic**
|
|
39
|
+
- 🔌 **No dependencies and no virtual DOM**
|
|
40
|
+
- 📦 **Tiny footprint (~57.7 kB unpacked)**
|
|
41
|
+
- 🧩 **TypeScript types (~4.35 kB)**
|
|
42
|
+
- 🛠️ **Works directly in the browser**
|
|
43
|
+
- 🔁 **JSX-style component structure**
|
|
44
|
+
- 🌐 **Sandboxed browser compiler**
|
|
37
45
|
|
|
38
46
|
---
|
|
39
47
|
|
|
40
48
|
## 📦 Installation
|
|
41
49
|
|
|
50
|
+
Install the Neutronium runtime:
|
|
51
|
+
|
|
42
52
|
```bash
|
|
43
|
-
npm
|
|
53
|
+
npm install neutronium
|
|
44
54
|
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## 🛠️ Setup
|
|
49
|
-
|
|
55
|
+
Install the CLI globally(optional, recommended):
|
|
56
|
+
```bash
|
|
57
|
+
npm install neutronium -g
|
|
50
58
|
```
|
|
59
|
+
---
|
|
60
|
+
## 🛠️ Create a Project
|
|
61
|
+
```bash
|
|
51
62
|
neu-cli create-app my-app
|
|
63
|
+
cd my-app
|
|
52
64
|
```
|
|
53
|
-
|
|
54
65
|
---
|
|
55
|
-
|
|
56
|
-
## Usage Example
|
|
66
|
+
## 🚀 Usage Example
|
|
57
67
|
```jsx
|
|
58
68
|
// App.js
|
|
59
|
-
import { createApp } from 'neutronium' // or ts-neutronium for
|
|
69
|
+
import { createApp } from 'neutronium' // or ts-neutronium for TypeScript
|
|
60
70
|
|
|
61
|
-
function Greeting(
|
|
62
|
-
return <h2>Hello, {
|
|
71
|
+
function Greeting({ name }) {
|
|
72
|
+
return <h2>Hello, {name}!</h2>;
|
|
63
73
|
}
|
|
64
74
|
|
|
65
75
|
export default function App() {
|
|
@@ -74,16 +84,41 @@ export default function App() {
|
|
|
74
84
|
createApp(App).mount('body');
|
|
75
85
|
```
|
|
76
86
|
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 🧪 Result
|
|
90
|
+

|
|
91
|
+
|
|
92
|
+
## Browser Sandbox
|
|
93
|
+
Neutronium provides a **browser-safe compiler** for live environments such as playgrounds:
|
|
94
|
+
```javascript
|
|
95
|
+
import { compile } from "neutronium/sandbox.mjs";
|
|
96
|
+
|
|
97
|
+
const result = compile(code);
|
|
98
|
+
```
|
|
99
|
+
This allows Neutronium code to be compiled without Node.js, making it ideal for online editors and sandboxes.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 📚 Documentation & Links
|
|
104
|
+
- 🌐 Website: https://neutronium-website.onrender.com/
|
|
105
|
+
- 📖 Docs: https://neutronium-website.onrender.com/Documentation/
|
|
106
|
+
- 🧪 Playground: https://neutronium-website.onrender.com/Playground/
|
|
107
|
+
- 🧠 GitHub: https://github.com/PFMCODES/neutronium
|
|
108
|
+
- 📦 NPM: https://www.npmjs.com/package/neutronium
|
|
79
109
|
|
|
80
110
|
---
|
|
81
111
|
|
|
82
|
-
##
|
|
83
|
-
|
|
84
|
-
|
|
112
|
+
## 📦 Packages Built with Neutronium
|
|
113
|
+
- [@neuhq/alert](https://www.npmjs.com/package/@neuhq/alert)
|
|
114
|
+
- [neutronium-alert](https://www.npmjs.com/package/neutronium-alert)
|
|
85
115
|
|
|
86
116
|
---
|
|
87
117
|
|
|
88
|
-
## Found a
|
|
89
|
-
|
|
118
|
+
## 🐞 Found a Bug or Issue?
|
|
119
|
+
Please report it here:
|
|
120
|
+
👉 https://github.com/PFMCODES/neutronium/issues/new
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
## License
|
|
124
|
+
MIT © PFMCODES
|
package/package.json
CHANGED
package/sandbox.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Babel from "https://esm.sh/@babel/standalone@7.28.6/es2022/standalone.mjs";
|
|
2
2
|
import { basehtml } from "./template.js";
|
|
3
3
|
|
|
4
|
-
export function
|
|
4
|
+
export function compile(source) {
|
|
5
5
|
try {
|
|
6
6
|
console.log("⚙️ Babel transforming");
|
|
7
7
|
|