Skip to content

Commit 1c68de3

Browse files
authored
Merge pull request #32 from Ebyte-Lab/fix/templates
Fix dependency injection and TypeScript comparison in templates
2 parents 01fe1f7 + 942fca3 commit 1c68de3

8 files changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ name: CI
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [main, dev]
66

77
jobs:
88
lint:
99
runs-on: ubuntu-latest
10+
1011
steps:
1112
- uses: actions/checkout@v4
13+
1214
- uses: actions/setup-node@v4
1315
with:
1416
node-version: '20'
1517
cache: 'npm'
16-
- run: npm install
17-
- run: npm run lint
18+
19+
- run: npm ci
20+
21+
- run: npm run lint

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generate.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ export async function generateProject(config) {
101101
const configFilePath = path.join(projectPath, 'opusify.config.json');
102102
fs.writeFileSync(configFilePath, JSON.stringify(config, null, 2));
103103

104-
// 5. AUTOMATION PHASE: Install Dependencies
104+
// 5. Resolve dynamic dependencies based on user choices
105+
resolveDependencies(projectPath, config);
106+
107+
// 6. AUTOMATION PHASE: Install Dependencies
105108
const installSpinner = ora({
106109
text: 'Installing dependencies (this might take a minute)...',
107110
spinner: 'squareCorners',

templates/blog/nextjs-monolith/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default function RootLayout({
9292
}: {
9393
children: React.ReactNode;
9494
}) {
95-
const useSidebar = '{{includeSidebar}}' === 'true';
95+
const useSidebar = ('{{includeSidebar}}' as string) === 'true';
9696

9797
return (
9898
<html lang="en" data-theme="{{design}}">

templates/ecommerce/nextjs-monolith/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function RootLayout({
7777
}: {
7878
children: React.ReactNode;
7979
}) {
80-
const useSidebar = '{{includeSidebar}}' === 'true';
80+
const useSidebar = ('{{includeSidebar}}' as string) === 'true';
8181

8282
return (
8383
<html lang="en" data-theme="{{design}}">

templates/saas/nextjs-monolith/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default function RootLayout({
9696
}: {
9797
children: React.ReactNode;
9898
}) {
99-
const useSidebar = '{{includeSidebar}}' === 'true';
99+
const useSidebar = ('{{includeSidebar}}' as string) === 'true';
100100

101101
return (
102102
<html lang="en" data-theme="{{design}}">

templates/saas/vite-react/src/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function Sidebar() {
7373
}
7474

7575
export default function Layout() {
76-
const useSidebar = '{{includeSidebar}}' === 'true';
76+
const useSidebar = ('{{includeSidebar}}' as string) === 'true';
7777

7878
if (useSidebar) {
7979
return (

templates/school/nextjs-monolith/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default function RootLayout({
9292
}: {
9393
children: React.ReactNode;
9494
}) {
95-
const useSidebar = '{{includeSidebar}}' === 'true';
95+
const useSidebar = ('{{includeSidebar}}' as string) === 'true';
9696

9797
return (
9898
<html lang="en" data-theme="{{design}}">

0 commit comments

Comments
 (0)