@hyperweb/build
v0.0.2
Published
build tools for hyperweb
Downloads
26
Readme
Hyperweb Build
Hyperweb Build is a powerful wrapper around esbuild, designed to simplify and streamline your build process for Hyperweb projects.
Features
- Simple API for building TypeScript projects
- Customizable build options
- Built-in support for common Hyperweb project configurations
- Easy integration with existing projects
Installation
npm install @hyperweb/build
Usage
Here's a basic example of how to use Hyperweb Build:
import { HyperwebBuild, defaultOptions } from '@hyperweb/build';
// Use default options
HyperwebBuild.build();
// Customize options
HyperwebBuild.build({
entryPoints: ['src/custom-entry.ts'],
outfile: 'dist/custom-bundle.js',
minify: true,
});
// Use default options as a base for a custom configuration
const myConfig = {
...defaultOptions,
minify: true,
target: 'es2018',
};
HyperwebBuild.build(myConfig);
API Reference
HyperwebBuild.build(options)
Builds your project using the provided options.
options
(optional): An object containing build options. If not provided, default options will be used.
Returns a Promise that resolves to the build result.
defaultOptions
An object containing the default build options. You can spread these into your own configuration for easy customization.
Default Configuration
Hyperweb Build comes with the following default configuration:
{
bundle: true,
minify: false,
outfile: 'dist/bundle.js',
platform: 'node',
sourcemap: true,
target: 'ESNext',
logLevel: 'info',
}
License
Hyperweb Build is MIT licensed.