check-prebuild.js
This file
Path
test/check-prebuild.js
21 lines · 444 bytes · JavaScript
Last changed by
Clean up dev dependenciesAndrey Sitnikbefore adoption261ac05
History of this fileTake it
Improve prebuild controlAndrey Sitnikbefore adoption1d6f2ff
lines 1–5why, one step back1#!/usr/bin/env node23import { readFile } from 'node:fs/promises'4import { styleText } from 'node:util'5Clean up dev dependenciesAndrey Sitnikbefore adoption261ac05
line 6why, one step back6import { BUILD_PATH, prebuild } from './prebuild.js'Improve prebuild controlAndrey Sitnikbefore adoption1d6f2ff
lines 7–21why, one step back78let [current, expected] = await Promise.all([9 readFile(BUILD_PATH, 'utf8'),10 prebuild()11])1213if (current !== expected) {14 process.stderr.write(15 styleText(16 ['red', 'bold'],17 'nanoid.js is outdated, run node test/update-prebuild.js'18 ) + '\n'19 )20 process.exit(1)21}