Skip to content

Commit

Permalink
feat: alpha release
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhk20 committed Oct 1, 2024
1 parent 5b9257a commit 080f3fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/gluestack-cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const init = new Command()
if (options.path !== config.writableComponentsPath) {
await checkWritablePath(options.path);
//check this change with all project types
config.writableComponentsPath = resolve(cwd, options.path);
config.writableComponentsPath = options.path;
}
}
// Detect project type
Expand Down
2 changes: 1 addition & 1 deletion packages/gluestack-cli/src/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const projectBasedDependencies: Dependencies = {
'@gluestack/ui-next-adapter': 'latest',
},
devDependencies: {
'@types/react-native': '',
'@types/react-native': '0.72.8',
},
},
expo: {
Expand Down
10 changes: 7 additions & 3 deletions packages/gluestack-cli/src/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,16 @@ function checkComponentDependencies(

// Add additional components
config.additionalComponents?.forEach((additionalComponent) => {
additionalDependencies.components.push(additionalComponent);
if (!additionalDependencies.components.includes(additionalComponent)) {
additionalDependencies.components.push(additionalComponent);
}
});

// Add hooks
config.hooks?.forEach((hook) => {
additionalDependencies.hooks.push(hook);
if (!additionalDependencies.hooks.includes(hook)) {
additionalDependencies.hooks.push(hook);
}
});
});

Expand Down Expand Up @@ -295,7 +299,7 @@ const installDependencies = async (
const commands: { [key: string]: { install: string; devFlag: string } } = {
npm: { install: 'npm install', devFlag: ' --save-dev' },
yarn: { install: 'yarn add', devFlag: ' --dev' },
pnpm: { install: 'pnpm i', devFlag: '' },
pnpm: { install: 'pnpm i', devFlag: '-D' },
bun: { install: 'bun add', devFlag: ' --dev' },
};
const { install, devFlag } = commands[versionManager];
Expand Down
4 changes: 2 additions & 2 deletions packages/gluestack/src/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ async function createProject(createOptions: ProjectOptions) {
// create next project

createCommand = projectType.includes('next-page-router')
? `npx create-next-app@latest ${projectName} --ts --no-eslint --use-${packageManager} --import-alias "@/*" --tailwind --no-src-dir --no-app`
: `npx create-next-app@latest ${projectName} --ts --no-eslint --use-${packageManager} --import-alias "@/*" --tailwind --no-src-dir --app`;
? `npx create-next-app@latest ${projectName} --ts --no-eslint --use-${packageManager} --import-alias "@/*" --no-tailwind --no-src-dir --no-app`
: `npx create-next-app@latest ${projectName} --ts --no-eslint --use-${packageManager} --import-alias "@/*" --no-tailwind --no-src-dir --app`;
} else if (projectType.includes('react-native')) {
// create react-native project

Expand Down

0 comments on commit 080f3fc

Please sign in to comment.