Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit a31ea43

Browse files
committed
readme
1 parent 46d7daa commit a31ea43

File tree

2 files changed

+144
-2
lines changed

2 files changed

+144
-2
lines changed

README.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,79 @@
1313
<a href="https://www.npmjs.com/package/@interweb/build"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/interweb-build?filename=packages%2Fbuild%2Fpackage.json"></a>
1414
</p>
1515

16-
## install
16+
Interweb Build is a powerful wrapper around esbuild, designed to simplify and streamline your build process for Interweb projects.
17+
18+
19+
## Features
20+
21+
- Simple API for building TypeScript projects
22+
- Customizable build options
23+
- Built-in support for common Interweb project configurations
24+
- Easy integration with existing projects
25+
26+
27+
## Installation
1728

1829
```sh
1930
npm install @interweb/build
2031
```
32+
33+
## Usage
34+
35+
Here's a basic example of how to use Interweb Build:
36+
37+
```js
38+
import { InterwebBuild, defaultOptions } from '@interweb/build';
39+
40+
// Use default options
41+
InterwebBuild.build();
42+
43+
// Customize options
44+
InterwebBuild.build({
45+
entryPoints: ['src/custom-entry.ts'],
46+
outfile: 'dist/custom-bundle.js',
47+
minify: true,
48+
});
49+
50+
// Use default options as a base for a custom configuration
51+
const myConfig = {
52+
...defaultOptions,
53+
minify: true,
54+
target: 'es2018',
55+
};
56+
InterwebBuild.build(myConfig);
57+
```
58+
59+
## API Reference
60+
61+
### `InterwebBuild.build(options)`
62+
63+
Builds your project using the provided options.
64+
65+
- `options` (optional): An object containing build options. If not provided, default options will be used.
66+
67+
Returns a Promise that resolves to the build result.
68+
69+
### `defaultOptions`
70+
71+
An object containing the default build options. You can spread these into your own configuration for easy customization.
72+
73+
## Default Configuration
74+
75+
Interweb Build comes with the following default configuration:
76+
77+
```ts
78+
{
79+
bundle: true,
80+
minify: false,
81+
outfile: 'dist/bundle.js',
82+
platform: 'node',
83+
sourcemap: true,
84+
target: 'ESNext',
85+
logLevel: 'info',
86+
}
87+
```
88+
89+
## License
90+
91+
Interweb Build is MIT licensed.

packages/build/README.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,79 @@
1313
<a href="https://www.npmjs.com/package/@interweb/build"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/interweb-build?filename=packages%2Fbuild%2Fpackage.json"></a>
1414
</p>
1515

16-
## install
16+
Interweb Build is a powerful wrapper around esbuild, designed to simplify and streamline your build process for Interweb projects.
17+
18+
19+
## Features
20+
21+
- Simple API for building TypeScript projects
22+
- Customizable build options
23+
- Built-in support for common Interweb project configurations
24+
- Easy integration with existing projects
25+
26+
27+
## Installation
1728

1829
```sh
1930
npm install @interweb/build
2031
```
32+
33+
## Usage
34+
35+
Here's a basic example of how to use Interweb Build:
36+
37+
```js
38+
import { InterwebBuild, defaultOptions } from '@interweb/build';
39+
40+
// Use default options
41+
InterwebBuild.build();
42+
43+
// Customize options
44+
InterwebBuild.build({
45+
entryPoints: ['src/custom-entry.ts'],
46+
outfile: 'dist/custom-bundle.js',
47+
minify: true,
48+
});
49+
50+
// Use default options as a base for a custom configuration
51+
const myConfig = {
52+
...defaultOptions,
53+
minify: true,
54+
target: 'es2018',
55+
};
56+
InterwebBuild.build(myConfig);
57+
```
58+
59+
## API Reference
60+
61+
### `InterwebBuild.build(options)`
62+
63+
Builds your project using the provided options.
64+
65+
- `options` (optional): An object containing build options. If not provided, default options will be used.
66+
67+
Returns a Promise that resolves to the build result.
68+
69+
### `defaultOptions`
70+
71+
An object containing the default build options. You can spread these into your own configuration for easy customization.
72+
73+
## Default Configuration
74+
75+
Interweb Build comes with the following default configuration:
76+
77+
```ts
78+
{
79+
bundle: true,
80+
minify: false,
81+
outfile: 'dist/bundle.js',
82+
platform: 'node',
83+
sourcemap: true,
84+
target: 'ESNext',
85+
logLevel: 'info',
86+
}
87+
```
88+
89+
## License
90+
91+
Interweb Build is MIT licensed.

0 commit comments

Comments
 (0)