接口开始5%
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { validateAssetBuildManifest } from './asset-build-manifest.mjs'
|
||||
|
||||
const scriptDirectory = path.dirname(fileURLToPath(import.meta.url))
|
||||
const workspace = path.resolve(scriptDirectory, '..', '..')
|
||||
const manifestArgument = process.argv[2]
|
||||
if (!manifestArgument) throw new Error('Usage: node validate-asset-build-manifest.mjs <workspace-relative-manifest>')
|
||||
|
||||
const manifestPath = path.resolve(workspace, manifestArgument)
|
||||
const manifest = JSON.parse(await readFile(manifestPath, 'utf8'))
|
||||
validateAssetBuildManifest(manifest, workspace)
|
||||
process.stdout.write(`ASSET-BUILD-MANIFEST PASS ${path.relative(workspace, manifestPath).replaceAll('\\', '/')}\n`)
|
||||
Reference in New Issue
Block a user