build: convert some scripts to TS (#24891)

This commit is contained in:
Samuel Attard 2020-08-07 13:48:46 -07:00 committed by GitHub
parent 2028492356
commit 4d50f3f62c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 29 deletions

View file

@ -1,6 +1,6 @@
const cp = require('child_process');
const fs = require('fs');
const path = require('path');
import * as cp from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
const certificatePath = process.argv[2];
const outPath = process.argv[3];

View file

@ -40,7 +40,7 @@ DevToolsSecurity -enable
# security import "$dir"/public.key -k $KEY_CHAIN
# Generate Trust Settings
node "$(dirname $0)"/gen-trust.js "$dir"/certificate.cer "$dir"/trust.xml
npx ts-node node "$(dirname $0)"/gen-trust.ts "$dir"/certificate.cer "$dir"/trust.xml
# Import Trust Settings
sudo security trust-settings-import -d "$dir/trust.xml"