diff --git a/scripts/sync-consumers.ps1 b/scripts/sync-consumers.ps1 index fd6591f..1895c21 100644 --- a/scripts/sync-consumers.ps1 +++ b/scripts/sync-consumers.ps1 @@ -103,7 +103,12 @@ function Convert-ToConsumerWebUiPackage { $manifest = Get-Content -LiteralPath $PackagePath -Raw | ConvertFrom-Json $manifest.files = @('src', 'README.md') - $manifest.dependencies = [pscustomobject]@{} + if ($null -ne $manifest.dependencies) { + $designTokensDependency = $manifest.dependencies.PSObject.Properties['@gabriel20xx/design-tokens'] + if ($null -ne $designTokensDependency) { + $manifest.dependencies.PSObject.Properties.Remove('@gabriel20xx/design-tokens') + } + } $manifest.svelte = './src/index.ts' $manifest.types = './src/index.ts' @@ -133,6 +138,7 @@ function Convert-ToConsumerWebUiSources { if (Test-Path -LiteralPath $stylesPath) { $styles = Get-Content -LiteralPath $stylesPath -Raw $styles = $styles.Replace("@import '@gabriel20xx/design-tokens/theme.css';", "@import '../../../design-tokens/theme.css';") + $styles = $styles.Replace('@import "@gabriel20xx/design-tokens/theme.css";', "@import '../../../design-tokens/theme.css';") Write-Utf8NoBom -Path $stylesPath -Content $styles }