initkit 1.2.2 → 1.2.4
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 +1 -1
- package/bin/index.js +1 -1
- package/package.json +2 -2
- package/src/utils/addonInstaller.js +8 -4
- package/src/utils/templateGenerator.js +6 -6
package/README.md
CHANGED
|
@@ -851,7 +851,7 @@ MIT © [Shirish Shrestha](https://github.com/shirishshrestha)
|
|
|
851
851
|
- **Issues**: [GitHub Issues](https://github.com/shirishshrestha/initkit/issues)
|
|
852
852
|
- **Discussions**: [GitHub Discussions](https://github.com/shirishshrestha/initkit/discussions)
|
|
853
853
|
- **Documentation**: [Full Documentation](./docs/QUICK_START.md)
|
|
854
|
-
- **Email**:
|
|
854
|
+
- **Email**: shirish.shrestha07@gmail.com
|
|
855
855
|
|
|
856
856
|
---
|
|
857
857
|
|
package/bin/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "initkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A modern CLI tool for scaffolding production-ready web projects with live npm version fetching, multiple frameworks, and best practices built-in",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"bugs": {
|
|
48
48
|
"url": "https://github.com/shirishshrestha/initkit/issues"
|
|
49
49
|
},
|
|
50
|
-
"homepage": "https://
|
|
50
|
+
"homepage": "https://initkit.shirishshrestha.com.np/",
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=14.0.0"
|
|
53
53
|
},
|
|
@@ -132,8 +132,10 @@ async function installStyling(projectPath, styling, config) {
|
|
|
132
132
|
|
|
133
133
|
// Create Tailwind config files directly (more reliable than running init command)
|
|
134
134
|
console.log(chalk.dim(' Initializing Tailwind configuration...'));
|
|
135
|
-
const
|
|
136
|
-
const
|
|
135
|
+
const fsExtra = await import('fs-extra');
|
|
136
|
+
const fs = fsExtra.default;
|
|
137
|
+
const pathModule = await import('path');
|
|
138
|
+
const path = pathModule.default;
|
|
137
139
|
|
|
138
140
|
// Create tailwind.config.js with proper content paths
|
|
139
141
|
const tailwindConfigPath = path.join(projectPath, 'tailwind.config.js');
|
|
@@ -219,8 +221,10 @@ async function installUILibrary(projectPath, library, config) {
|
|
|
219
221
|
console.log(chalk.dim(' Running shadcn-ui init...'));
|
|
220
222
|
|
|
221
223
|
// Ensure tsconfig has path aliases for shadcn
|
|
222
|
-
const
|
|
223
|
-
const
|
|
224
|
+
const fsExtra = await import('fs-extra');
|
|
225
|
+
const fs = fsExtra.default;
|
|
226
|
+
const pathModule = await import('path');
|
|
227
|
+
const path = pathModule.default;
|
|
224
228
|
const tsconfigPath = path.join(projectPath, 'tsconfig.json');
|
|
225
229
|
|
|
226
230
|
if (await fs.pathExists(tsconfigPath)) {
|
|
@@ -91,7 +91,7 @@ async function createFeatureBasedStructure(srcPath, config) {
|
|
|
91
91
|
|
|
92
92
|
// Add barrel export
|
|
93
93
|
const ext = config.language === 'typescript' ? 'ts' : 'js';
|
|
94
|
-
await fs.
|
|
94
|
+
await fs.outputFile(
|
|
95
95
|
path.join(srcPath, 'features', feature, `index.${ext}`),
|
|
96
96
|
`// ${feature} feature exports\n// TODO: Export your components and hooks here\n`
|
|
97
97
|
);
|
|
@@ -259,7 +259,7 @@ DATABASE_URL=
|
|
|
259
259
|
API_KEY=
|
|
260
260
|
`;
|
|
261
261
|
|
|
262
|
-
await fs.
|
|
262
|
+
await fs.outputFile(path.join(projectPath, '.env.example'), envExample);
|
|
263
263
|
console.log(chalk.gray(' ✓ Added .env.example'));
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -311,7 +311,7 @@ EXPOSE 3000
|
|
|
311
311
|
CMD ["npm", "start"]
|
|
312
312
|
`;
|
|
313
313
|
|
|
314
|
-
await fs.
|
|
314
|
+
await fs.outputFile(path.join(projectPath, 'Dockerfile'), dockerfile);
|
|
315
315
|
|
|
316
316
|
const dockerignore = `node_modules
|
|
317
317
|
.git
|
|
@@ -319,7 +319,7 @@ CMD ["npm", "start"]
|
|
|
319
319
|
npm-debug.log
|
|
320
320
|
`;
|
|
321
321
|
|
|
322
|
-
await fs.
|
|
322
|
+
await fs.outputFile(path.join(projectPath, '.dockerignore'), dockerignore);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/**
|
|
@@ -361,7 +361,7 @@ jobs:
|
|
|
361
361
|
run: npm test
|
|
362
362
|
`;
|
|
363
363
|
|
|
364
|
-
await fs.
|
|
364
|
+
await fs.outputFile(path.join(projectPath, '.github', 'workflows', 'ci.yml'), workflow);
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
/**
|
|
@@ -379,7 +379,7 @@ async function generateHuskyFiles(projectPath, _config) {
|
|
|
379
379
|
npm run lint
|
|
380
380
|
`;
|
|
381
381
|
|
|
382
|
-
await fs.
|
|
382
|
+
await fs.outputFile(path.join(projectPath, '.husky', 'pre-commit'), preCommit);
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
export { generateTemplate };
|