https://github.com/hackolade/hck-esbuild-plugins-pack
The pack of custom ESbuild plugins for packaging Hackolade plugins
https://github.com/hackolade/hck-esbuild-plugins-pack
Last synced: 10 months ago
JSON representation
The pack of custom ESbuild plugins for packaging Hackolade plugins
- Host: GitHub
- URL: https://github.com/hackolade/hck-esbuild-plugins-pack
- Owner: hackolade
- License: mit
- Created: 2023-09-06T11:49:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-11T17:49:36.000Z (about 1 year ago)
- Last Synced: 2025-04-14T20:12:19.809Z (10 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hck-esbuild-plugins-pack
The pack of custom ESbuild plugins for packaging Hackolade plugins
## Contains
- **copyFolderFiles** - Plugin for copy files from folder where script executed to package folder. Support excluding files by extension or by file name.
- **addReleaseFlag** - Plugin for modifying package.json file by adding `release: true` flag
## Installation
```
npm install @hackolade/hck-esbuild-plugins-pack
```
## Usage
```javascript
import { build } from 'esbuild';
import { copyFolderFiles, addReleaseFlag } from '@hackolade/hck-esbuild-plugins-pack';
(async () => {
const res = await build({
entryPoints: ['./demo.js'],
bundle: true,
outfile: './dist/main.js',
plugins: [
copyFolderFiles({
fromPath: __dirname,
targetFolderPath: './dist',
excludedExtensions: ['.js', '.g4'],
excludedFiles: ['.github', 'package-lock.json'],
}),
addReleaseFlag('./dist/package.json'),
],
});
})();
```