|
12 | 12 | * --no-minify Build without minification for debugging |
13 | 13 | */ |
14 | 14 |
|
| 15 | +import { promises as fs } from 'node:fs' |
| 16 | +import path from 'node:path' |
| 17 | +import { fileURLToPath } from 'node:url' |
| 18 | + |
15 | 19 | import { WIN32 } from '@socketsecurity/lib/constants/platform' |
16 | 20 | import { logger } from '@socketsecurity/lib/logger' |
17 | 21 | import { spawn } from '@socketsecurity/lib/spawn' |
18 | 22 |
|
| 23 | +const __dirname = path.dirname(fileURLToPath(import.meta.url)) |
| 24 | +const packageRoot = path.resolve(__dirname, '..') |
| 25 | +const repoRoot = path.resolve(__dirname, '../../..') |
| 26 | + |
19 | 27 | // Simple CLI helpers without registry dependencies. |
20 | 28 | const isQuiet = () => process.argv.includes('--quiet') |
21 | 29 | const isVerbose = () => process.argv.includes('--verbose') |
@@ -114,11 +122,6 @@ async function main() { |
114 | 122 | command: 'node', |
115 | 123 | args: ['scripts/compress-cli.mjs'], |
116 | 124 | }, |
117 | | - { |
118 | | - name: 'Copy Logos', |
119 | | - command: 'node', |
120 | | - args: ['scripts/copy-logos.mjs'], |
121 | | - }, |
122 | 125 | ] |
123 | 126 |
|
124 | 127 | // Run build steps sequentially. |
@@ -152,6 +155,18 @@ async function main() { |
152 | 155 | } |
153 | 156 | } |
154 | 157 |
|
| 158 | + // Copy logo images from repo root. |
| 159 | + if (!quiet && verbose) { |
| 160 | + log.info('Copying logo images from repo root...') |
| 161 | + } |
| 162 | + const images = ['logo-dark.png', 'logo-light.png'] |
| 163 | + for (const image of images) { |
| 164 | + await fs.cp(path.join(repoRoot, image), path.join(packageRoot, image)) |
| 165 | + } |
| 166 | + if (!quiet && verbose) { |
| 167 | + log.success('Logo images copied') |
| 168 | + } |
| 169 | + |
155 | 170 | if (!quiet) { |
156 | 171 | printSuccess('Build completed') |
157 | 172 | printFooter() |
|
0 commit comments