diff --git a/programs/create/lib/messages.ts b/programs/create/lib/messages.ts index fac33193..d714b9b0 100644 --- a/programs/create/lib/messages.ts +++ b/programs/create/lib/messages.ts @@ -234,14 +234,6 @@ export function cantInstallDependencies(projectName: string, error: any) { ) } -export function symlinkCreated() { - return 'Symlink created successfully.' -} - -export function symlinkError(command: string, args: string[]) { - return `${red(`✖︎✖︎✖︎`)} Failed to create symlink: ${red(command)} ${red(args.join(' '))}` -} - export function writingPackageJsonMetadata() { return `📝 - Writing ${brightYellow(`package.json`)} metadata...` } diff --git a/programs/create/steps/install-dependencies.ts b/programs/create/steps/install-dependencies.ts index 78688074..8c7e595c 100644 --- a/programs/create/steps/install-dependencies.ts +++ b/programs/create/steps/install-dependencies.ts @@ -11,7 +11,6 @@ import fs from 'fs' import * as messages from '../lib/messages' import * as utils from '../lib/utils' -import {createSymlink} from './symlink-extension-js' function getInstallArgs() { return ['install', '--silent'] @@ -28,11 +27,6 @@ export async function installDependencies( console.log(messages.installingDependencies()) - // Symlink Extension for development - if (process.env.EXTENSION_ENV === 'development') { - await createSymlink(projectPath) - } - try { const originalDirectory = process.cwd() diff --git a/programs/create/steps/symlink-extension-js.ts b/programs/create/steps/symlink-extension-js.ts deleted file mode 100644 index 11733b23..00000000 --- a/programs/create/steps/symlink-extension-js.ts +++ /dev/null @@ -1,42 +0,0 @@ -// ██████╗██████╗ ███████╗ █████╗ ████████╗███████╗ -// ██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██╔════╝ -// ██║ ██████╔╝█████╗ ███████║ ██║ █████╗ -// ██║ ██╔══██╗██╔══╝ ██╔══██║ ██║ ██╔══╝ -// ╚██████╗██║ ██║███████╗██║ ██║ ██║ ███████╗ -// ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ - -import path from 'path' -import {spawn} from 'cross-spawn' -import * as messages from '../lib/messages' -import * as utils from '../lib/utils' - -export async function createSymlink(projectPath: string) { - const extensionJsCliDir = path.join(__dirname, '../../cli') - const command = await utils.getInstallCommand() - const args = ['link'] - - await new Promise((resolve, reject) => { - // Link Extension to the project - const linkExtensionJs = spawn(command, args, { - cwd: extensionJsCliDir - }) - - linkExtensionJs.on('close', () => { - const linkProcess = spawn(command, [...args, 'extension'], { - stdio: 'inherit', - cwd: projectPath - }) - - linkProcess.on('close', (code) => { - if (code === 0) { - console.log(messages.symlinkCreated()) - resolve() - } else { - reject(new Error(messages.symlinkError(command, args))) - } - }) - }) - }) - - console.log('Symlink creation completed.') -}