[python] Update to esbuild script (#10470)

Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
Chris Barber
2023-09-08 16:23:23 -05:00
committed by GitHub
parent 0a08e4b23e
commit 6baefc825a
4 changed files with 8 additions and 33 deletions

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env node
const fs = require('fs-extra');
const execa = require('execa');
const { join } = require('path');
async function main() {
const outDir = join(__dirname, 'dist');
// Start fresh
await fs.remove(outDir);
await execa(
'ncc',
[
'build',
join(__dirname, 'src/index.ts'),
'-e',
'@vercel/build-utils',
'-o',
outDir,
],
{ stdio: 'inherit' }
);
}
main().catch(err => {
console.error(err);
process.exit(1);
});

View File

@@ -14,7 +14,7 @@
"directory": "packages/python"
},
"scripts": {
"build": "node build",
"build": "node ../../utils/build-builder.mjs",
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --runInBand --bail",
"test-unit": "pnpm test test/unit.test.ts",
"test-e2e": "pnpm test test/integration-*"

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"declaration": true,
"declaration": false,
"esModuleInterop": true,
"lib": ["ES2021"],
"module": "commonjs",
@@ -15,6 +15,5 @@
"strict": true,
"target": "ES2021"
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
"include": ["src/**/*"]
}