Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild

Package Overview
Dependencies
Maintainers
1
Versions
456
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild - npm Package Compare versions

Comparing version 0.1.20 to 0.1.21

lib/main.d.ts

4

package.json
{
"name": "esbuild",
"version": "0.1.20",
"version": "0.1.21",
"description": "An extremely fast JavaScript bundler and minifier.",

@@ -9,4 +9,6 @@ "repository": "https://github.com/evanw/esbuild",

},
"main": "lib/main.js",
"types": "lib/main.d.ts",
"bin": "bin/esbuild",
"license": "MIT"
}
# esbuild
This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
## JavaScript API
In addition to exposing the `esbuild` command-line tool, this package also exposes a JavaScript API that can be used to invoke the command-line tool from JavaScript. The API is a single function called `build()`.
Example usage:
```js
const esbuild = require('esbuild')
const fs = require('fs')
esbuild.build({
entryPoints: ['./example.ts'],
minify: true,
bundle: true,
outfile: './example.min.js',
}).then(
({ stderr, warnings }) => {
const output = fs.readFileSync('./example.min.js', 'utf8')
console.log('success', { output, stderr, warnings })
},
({ stderr, errors, warnings }) => {
console.error('failure', { stderr, errors, warnings })
}
)
```
See [the TypeScript type definitions](./lib/main.d.ts) for the complete set of options.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc