Skip to content

Commit

Permalink
remove install of asset-pack
Browse files Browse the repository at this point in the history
  • Loading branch information
gonpombo8 committed Sep 5, 2024
1 parent bc3c487 commit 6fd642b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 39 deletions.
4 changes: 2 additions & 2 deletions packages/@dcl/sdk-commands/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions packages/@dcl/sdk-commands/src/commands/build/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import path from 'path'
import { CliComponents } from '../../components'
import { declareArgs } from '../../logic/args'
import {
installAssetPack,
installDependencies,
isEditorScene,
needsDependencies,
SceneProject,
WearableProject
} from '../../logic/project-validations'
import { installDependencies, needsDependencies, SceneProject, WearableProject } from '../../logic/project-validations'
import { getBaseCoords } from '../../logic/scene-validations'
import { b64HashingFunction } from '../../logic/project-files'
import { bundleProject } from '../../logic/bundle'
Expand Down Expand Up @@ -70,10 +63,6 @@ export async function buildScene(options: Options, project: SceneProject | Weara
if (await needsDependencies(options.components, project.workingDirectory)) {
await installDependencies(options.components, project.workingDirectory)
}

if (await isEditorScene(options.components, project.workingDirectory)) {
await installAssetPack(options.components, project.workingDirectory)
}
}

const watch = !!options.args['--watch']
Expand Down
27 changes: 2 additions & 25 deletions packages/@dcl/sdk-commands/src/logic/project-validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Scene } from '@dcl/schemas'
import path from 'path'
import { CliComponents } from '../components'
import { colors } from '../components/log'
import { printProgressInfo, printSuccess, printWarning } from './beautiful-logs'
import { printProgressInfo } from './beautiful-logs'
import { CliError } from './error'
import { getSceneFilePath, getValidSceneJson } from './scene-validations'
import { getInstalledPackageVersion, getInstalledPackageVersionInsidePackage } from './config'
import { getInstalledPackageVersion } from './config'
import { getSmartWearableFile, getValidWearableJson } from './portable-experience-sw-validations'
import { getPackageJson } from './project-files'

Expand Down Expand Up @@ -74,29 +74,6 @@ export async function installDependencies(
printProgressInfo(components.logger, colors.white('✅ Installing dependencies...'))
}

/*
* Runs "npm install" for desired project
*/
export async function installAssetPack(
components: Pick<CliComponents, 'logger' | 'spawner' | 'fs'>,
workingDirectory: string
): Promise<void> {
const assetPack = '@dcl/asset-packs' as const
let assetPackVersion: string = ''
try {
assetPackVersion = await getInstalledPackageVersionInsidePackage(
components,
assetPack,
'@dcl/inspector',
workingDirectory
)
await components.spawner.exec(workingDirectory, npmBin, ['install', `${assetPack}@${assetPackVersion}`, '-D'])
printSuccess(components.logger, `${assetPack}@${assetPackVersion} installed`, '')
} catch (e: any) {
printWarning(components.logger, `Failed to install ${assetPack}@${assetPackVersion}' \n ${e.message}`)
}
}

/**
* Run NPM commands
*/
Expand Down

0 comments on commit 6fd642b

Please sign in to comment.