File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 3030 "lint:js:fix" : " eslint . --fix" ,
3131 "lint:types" : " glint" ,
3232 "start" : " rollup --config --watch --environment development" ,
33- "prepublishOnly" : " pnpm build && test -f 'dist/styles/@hashicorp/design-system-components.css' || (echo \"\n\\ 033[31m⚠️ Error: the pre-compiled CSS file \\ `dist/styles/@hashicorp/design-system-components.css\\ ` was not found\\ 033[0m\\ n\" && exit 1)"
33+ "test:dist-files" : " node scripts/check-dist-files.mjs" ,
34+ "prepublishOnly" : " pnpm build && pnpm test:dist-files"
3435 },
3536 "dependencies" : {
3637 "@codemirror/autocomplete" : " ^6.20.0" ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ import { existsSync } from 'node:fs' ;
4+
5+ const FILES_TO_CHECK = [
6+ 'dist/styles/@hashicorp/design-system-components.css' ,
7+ 'dist/styles/@hashicorp/design-system-power-select-overrides.css' ,
8+ ] ;
9+
10+ let hasErrors = false ;
11+
12+ for ( const file of FILES_TO_CHECK ) {
13+ if ( ! existsSync ( file ) ) {
14+ console . error (
15+ `\n\x1b[31m⚠️ Error: the pre-compiled CSS file \`${ file } \` was not found\x1b[0m\n`
16+ ) ;
17+ hasErrors = true ;
18+ }
19+ }
20+
21+ if ( hasErrors ) {
22+ process . exit ( 1 ) ;
23+ }
You can’t perform that action at this time.
0 commit comments