create-aziz-app 2.0.15 → 3.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.
Files changed (56) hide show
  1. package/README.md +3 -3
  2. package/bin/create-aziz-app.js +9 -9
  3. package/package.json +10 -11
  4. package/template/README.md +5 -5
  5. package/template/_framework/boot.js +3 -3
  6. package/template/_framework/hooks.js +1 -1
  7. package/template/{modules → _framework}/next-response.js +5 -13
  8. package/template/_framework/router.js +1 -1
  9. package/template/_framework/runtime.js +1 -1
  10. package/template/api/createUser.js +1 -1
  11. package/template/api/hello.js +1 -1
  12. package/template/api/loginUser.js +1 -1
  13. package/template/api/users.js +1 -1
  14. package/template/app/about/page.js +1 -1
  15. package/template/app/layout.js +1 -1
  16. package/template/components/Footer.js +1 -1
  17. package/template/components/Navbar.js +1 -1
  18. package/template/package.json +4 -7
  19. package/template/scripts/dev-server.js +1 -1
  20. package/template/.vscode/settings.json +0 -15
  21. package/template/api/getUser.js +0 -60
  22. package/template/api/getUserWithDB.js +0 -65
  23. package/template/app.config.js +0 -41
  24. package/template/app.html +0 -55
  25. package/template/components/Counter.jsx +0 -36
  26. package/template/components/Footer.jsx +0 -9
  27. package/template/components/Navbar.jsx +0 -17
  28. package/template/docs/API-GUIDE.md +0 -196
  29. package/template/docs/API-ROUTES.md +0 -538
  30. package/template/docs/AUTO-IMPORT.md +0 -99
  31. package/template/docs/AUTO-REGISTRATION.md +0 -248
  32. package/template/docs/CSS-FRAMEWORKS.md +0 -221
  33. package/template/docs/DEV-SERVER.md +0 -184
  34. package/template/docs/GETTING-STARTED.md +0 -205
  35. package/template/docs/HOW-IT-WORKS.md +0 -362
  36. package/template/docs/NEXTJS-APP-ROUTER.md +0 -536
  37. package/template/docs/NEXTJS-COMPARISON.md +0 -473
  38. package/template/docs/QUICK-START.md +0 -111
  39. package/template/docs/STYLING.md +0 -269
  40. package/template/docs/TROUBLESHOOTING.md +0 -282
  41. package/template/modules/README.md +0 -129
  42. package/template/modules/api.js +0 -44
  43. package/template/modules/auto-import.js +0 -130
  44. package/template/modules/router.js +0 -218
  45. package/template/modules/state.js +0 -248
  46. package/template/package-lock.json +0 -13
  47. package/template/pages/About.jsx +0 -48
  48. package/template/pages/ApiDemo.jsx +0 -209
  49. package/template/pages/Contact.jsx +0 -25
  50. package/template/pages/Example.jsx +0 -59
  51. package/template/pages/Home.jsx +0 -39
  52. package/template/pages/HooksDemo.jsx +0 -194
  53. package/template/pages/test.jsx +0 -72
  54. package/template/scripts/build.js +0 -81
  55. package/template/scripts/generate-imports.js +0 -88
  56. package/template/tailwind.config.js +0 -17
@@ -1,88 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
-
6
- console.log('🔍 Auto-generating imports...\n');
7
-
8
- // Scan a directory for files
9
- function scanDirectory(dir, extensions = []) {
10
- const files = [];
11
-
12
- if (!fs.existsSync(dir)) {
13
- return files;
14
- }
15
-
16
- const items = fs.readdirSync(dir);
17
-
18
- for (const item of items) {
19
- const fullPath = path.join(dir, item);
20
- const stat = fs.statSync(fullPath);
21
-
22
- if (stat.isFile()) {
23
- const ext = path.extname(item);
24
- if (extensions.length === 0 || extensions.includes(ext)) {
25
- files.push(path.relative('.', fullPath).replace(/\\/g, '/'));
26
- }
27
- }
28
- }
29
-
30
- return files;
31
- }
32
-
33
- // Scan for files
34
- const components = scanDirectory('components', ['.jsx', '.js']);
35
- const pages = scanDirectory('pages', ['.jsx', '.js']);
36
-
37
- console.log(`🧩 Found ${components.length} components`);
38
- console.log(`📄 Found ${pages.length} pages\n`);
39
-
40
- // Read app.html
41
- let html = fs.readFileSync('app.html', 'utf8');
42
-
43
- // Generate script tags
44
- let scriptTags = ' <!-- Load core modules -->\n';
45
- scriptTags += ' <script type="text/babel" src="modules/router.js"></script>\n';
46
- scriptTags += ' <script type="text/babel" src="modules/state.js"></script>\n';
47
- scriptTags += ' <script type="text/babel" src="modules/api.js"></script>\n\n';
48
-
49
- if (components.length > 0) {
50
- scriptTags += ' <!-- Load shared components -->\n';
51
- components.forEach(component => {
52
- scriptTags += ` <script type="text/babel" src="${component}"></script>\n`;
53
- });
54
- scriptTags += '\n';
55
- }
56
-
57
- if (pages.length > 0) {
58
- scriptTags += ' <!-- Load pages -->\n';
59
- pages.forEach(page => {
60
- scriptTags += ` <script type="text/babel" src="${page}"></script>\n`;
61
- });
62
- scriptTags += '\n';
63
- }
64
-
65
- scriptTags += ' <!-- Start the app -->\n';
66
- scriptTags += ' <script type="text/babel">\n';
67
- scriptTags += ' startApp();\n';
68
- scriptTags += ' </script>';
69
-
70
- // Replace the scripts section
71
- const startMarker = ' <!-- Load core modules -->';
72
- const endMarker = '</script>';
73
-
74
- const startIndex = html.indexOf(startMarker);
75
- const endIndex = html.lastIndexOf(endMarker);
76
-
77
- if (startIndex !== -1 && endIndex !== -1) {
78
- const before = html.substring(0, startIndex);
79
- const after = html.substring(endIndex + endMarker.length);
80
-
81
- html = before + scriptTags + after;
82
-
83
- fs.writeFileSync('app.html', html);
84
- console.log('✅ Updated app.html with new imports\n');
85
- console.log('🎉 Done! Refresh your browser to see changes.');
86
- } else {
87
- console.error('❌ Could not find script markers in app.html');
88
- }
@@ -1,17 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: [
4
- "./pages/**/*.{js,jsx}",
5
- "./components/**/*.{js,jsx}",
6
- "./app.html",
7
- ],
8
- theme: {
9
- extend: {
10
- colors: {
11
- primary: '#61dafb',
12
- dark: '#282c34',
13
- },
14
- },
15
- },
16
- plugins: [],
17
- }