Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: cleanup
  • Loading branch information
Nsttt committed Mar 6, 2025
commit bb7f02a8d8343049d79d3087e6353ad43cf87e98
27 changes: 0 additions & 27 deletions packages/create-module-federation/src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,31 +313,6 @@ async function forgeTemplate({
await renderTemplate(templateDir);
}

async function getProjectType(template?: string) {
if (!template) {
return checkCancel<ProjectType>(
await select({
message: 'Please select the type of project you want to create:',
options: [
{ value: ProjectType.app, label: 'Application' },
{ value: ProjectType.lib, label: 'Lib' },
{ value: ProjectType.other, label: 'Other' },
],
}),
);
}

if (template.startsWith('create-')) {
return ProjectType.other;
}

if (template.includes('lib')) {
return ProjectType.lib;
}

return ProjectType.app;
}

export async function create({
name,
templates,
Expand Down Expand Up @@ -376,13 +351,11 @@ export async function create({
}),
);

// If Zephyr is selected, run the zephyr-apps command and exit
if (projectType === ProjectType.zephyr) {
const zephyrPackage = OTHER_TYPE['zephyr'].packageName;
const zephyrCommand = `${pkgManager} create ${zephyrPackage}`;
note(`Running: ${zephyrCommand}`, 'Launching Zephyr setup');

// Execute the Zephyr command based on the user's package manager
spawnSync(pkgManager, ['create', zephyrPackage], {
stdio: 'inherit',
shell: true,
Expand Down
4 changes: 0 additions & 4 deletions packages/create-module-federation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ interface Template {
}

export const TEMPLATES = [
// Standard templates
'provider-modern',
'consumer-modern',
'provider-rsbuild',
'consumer-rsbuild',
'rslib',
'rslib-storybook',

// other
'create-zephyr',
];

create({
Expand Down