diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..a5f2426 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +build.js \ No newline at end of file diff --git a/build.js b/build.js index 10af73c..323b8a2 100644 --- a/build.js +++ b/build.js @@ -1,11 +1,10 @@ const esbuild = require('esbuild'); -const { dtsPlugin } = require("esbuild-plugin-d.ts"); +const { dtsPlugin } = require('esbuild-plugin-d.ts'); const libDest = 'dist/esbuild/smartypay-node-sdk.js'; const cliDest = 'dist/esbuild/smartypay-cli.js'; -async function build(){ - +async function build() { // lib await esbuild.build({ logLevel: 'info', @@ -15,12 +14,9 @@ async function build(){ sourcemap: 'external', platform: 'node', outfile: libDest, - plugins: [ - dtsPlugin() - ] + plugins: [dtsPlugin()], }); - // cli await esbuild.build({ logLevel: 'info', @@ -31,12 +27,9 @@ async function build(){ platform: 'node', outfile: cliDest, }); - } - build().catch((e) => { console.error('build error', e); - process.exit(1) + process.exit(1); }); -