0.0.1 • Published 9 months ago

@hackolade/hck-esbuild-plugins-pack v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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

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'),
        ],
    });
})();
0.0.1

9 months ago