create-aziz-app 2.0.14 → 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.
- package/README.md +227 -0
- package/bin/create-aziz-app.js +9 -9
- package/package.json +10 -11
- package/template/README.md +862 -138
- package/template/_framework/boot.js +36 -0
- package/template/_framework/hooks.js +207 -0
- package/template/{modules → _framework}/next-response.js +5 -13
- package/template/_framework/router.js +279 -0
- package/template/_framework/runtime.js +86 -0
- package/template/api/createUser.js +1 -1
- package/template/api/hello.js +8 -17
- package/template/api/loginUser.js +1 -1
- package/template/api/users.js +38 -134
- package/template/app/about/page.js +45 -0
- package/template/app/layout.js +23 -0
- package/template/app/page.js +54 -0
- package/template/app/test/page.js +55 -0
- package/template/components/Footer.js +10 -0
- package/template/components/Navbar.js +30 -0
- package/template/index.html +24 -0
- package/template/package.json +5 -14
- package/template/scripts/dev-server.js +330 -302
- package/template/scripts/live-reload-client.js +0 -1
- package/template/.vscode/settings.json +0 -15
- package/template/api/getUser.js +0 -60
- package/template/api/getUserWithDB.js +0 -65
- package/template/app.config.js +0 -41
- package/template/app.html +0 -55
- package/template/components/Counter.jsx +0 -36
- package/template/components/Footer.jsx +0 -9
- package/template/components/Navbar.jsx +0 -17
- package/template/docs/API-GUIDE.md +0 -196
- package/template/docs/API-ROUTES.md +0 -538
- package/template/docs/AUTO-IMPORT.md +0 -99
- package/template/docs/AUTO-REGISTRATION.md +0 -248
- package/template/docs/CSS-FRAMEWORKS.md +0 -221
- package/template/docs/DEV-SERVER.md +0 -184
- package/template/docs/GETTING-STARTED.md +0 -205
- package/template/docs/HOW-IT-WORKS.md +0 -362
- package/template/docs/NEXTJS-APP-ROUTER.md +0 -536
- package/template/docs/NEXTJS-COMPARISON.md +0 -473
- package/template/docs/QUICK-START.md +0 -111
- package/template/docs/STYLING.md +0 -269
- package/template/docs/TROUBLESHOOTING.md +0 -282
- package/template/modules/README.md +0 -129
- package/template/modules/api.js +0 -44
- package/template/modules/auto-import.js +0 -130
- package/template/modules/router.js +0 -218
- package/template/modules/state.js +0 -248
- package/template/package-lock.json +0 -13
- package/template/pages/About.jsx +0 -48
- package/template/pages/ApiDemo.jsx +0 -209
- package/template/pages/Contact.jsx +0 -25
- package/template/pages/Example.jsx +0 -59
- package/template/pages/Home.jsx +0 -39
- package/template/pages/HooksDemo.jsx +0 -194
- package/template/pages/test.jsx +0 -72
- package/template/scripts/build.js +0 -81
- package/template/scripts/generate-imports.js +0 -88
- 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
|
-
}
|