heliocrafts
Advanced tools
Comparing version 2.0.21 to 2.0.22
@@ -16,2 +16,3 @@ #!/usr/bin/env node | ||
console.log("inside index.ts", key); | ||
key.replace(".tsx", ".ts").replace(".jsx", ".js"); | ||
const filePathParts = key.split('/').filter(part => part !== ''); // Split path and remove empty parts | ||
@@ -31,6 +32,10 @@ let currentPath = './'; // Start with the current directory | ||
const fileContent = `/* eslint-disable */\nimport ${folderName} from './${folderName}'; | ||
function App(props) { | ||
const fileContent = key.startsWith(`/${folderName}/index.ts`) ? `/* eslint-disable */\nimport ${folderName} from './${folderName}'; | ||
function App(props: any) { | ||
return <${folderName} {...props} />; | ||
} | ||
export default App;`: `/* eslint-disable */\nimport ${folderName} from './${folderName}'; | ||
function App(props: any) { | ||
return <${folderName} {...props} />; | ||
} | ||
export default App;`; | ||
@@ -37,0 +42,0 @@ if (typeof fileContent === 'string' || fileContent instanceof Buffer) { |
{ | ||
"name": "heliocrafts", | ||
"version": "2.0.21", | ||
"version": "2.0.22", | ||
"description": "A CLI to integrate cutting-edge and production-ready web components from heliocrafts into your project.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
9682
189