New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-multicontext

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-multicontext - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "esbuild-multicontext",
"description": "Minimal wrapper over esbuild's context API",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "type": "module",

@@ -17,9 +17,42 @@ # esbuild-multicontext

> API Status: `unstable`
```js
import { createContext } from 'esbuild-multicontext'
Please use the `build.js` file to get a basic idea of the current API, this will
change till the library reaches `0.0.1`
const buildContext = createContext()
// Use the helper glob to find files and directories
const entries = await buildContext.glob('./src/*.js', {
filesOnly: true,
})
buildContext.add('esm', {
entryPoints: entries,
outdir: './dist/esm',
format: 'esm',
outExtension: {
'.js': '.mjs',
},
})
buildContext.hook('esm:complete', async () => {
// context built completely
})
buildContext.hook('esm:error', async error => {
// context failed with `error`
})
buildContext.hook('error', async error => {
// multi context build failed
})
// Watch each context and re-build on change
await buildContext.watch()
// Build each context and notify the respective hooks
await buildContext.build()
```
## License
[MIT](/LICENSE)
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