vaderjs 1.8.1 → 1.8.3

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.
@@ -3,8 +3,8 @@ export default function App() {
3
3
  let [count, setCount] = useState(0);
4
4
  return (
5
5
  <div>
6
- <h1>{count()}</h1>
7
- <button onClick={() => setCount(count() + 1)}>Increment</button>
6
+ <h1>{count}</h1>
7
+ <button onClick={() => setCount(count + 1)}>Increment</button>
8
8
  </div>
9
9
  );
10
10
  }
package/main.js CHANGED
@@ -179,7 +179,9 @@ const handleReplacements = (code) => {
179
179
  return c
180
180
  }
181
181
 
182
-
182
+ if (!fs.existsSync(process.cwd() + '/dev/bundler.js')) {
183
+ fs.copyFileSync(require.resolve('vaderjs/bundler/index.js'), process.cwd() + '/dev/bundler.js')
184
+ }
183
185
  let start = Date.now()
184
186
  async function generateApp() {
185
187
  globalThis.isBuilding = true;
@@ -223,9 +225,7 @@ async function generateApp() {
223
225
  \n${code}
224
226
  `)
225
227
  fs.mkdirSync(process.cwd() + '/dev', { recursive: true })
226
- if (!fs.existsSync(process.cwd() + '/dev/bundler.js')) {
227
- fs.copyFileSync(require.resolve('vaderjs/bundler/index.js'), process.cwd() + '/dev/bundler.js')
228
- }
228
+
229
229
 
230
230
  if (!fs.existsSync(process.cwd() + '/dev/readme.md')) {
231
231
  fs.writeFileSync(process.cwd() + '/dev/readme.md', `# Please do not edit the bundler.js file in the dev directory. This file is automatically generated by the bundler. \n\n`)
@@ -555,3 +555,6 @@ else {
555
555
  console.log(ansiColors.green('Server started at http://localhost:' + port || 8080))
556
556
  }
557
557
  }
558
+
559
+
560
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vaderjs",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "A simple and powerful JavaScript library for building modern web applications.",
5
5
  "bin": {
6
6
  "vaderjs": "./main.js"