@hackolade/hck-esbuild-plugins-pack

0.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @hackolade/hck-esbuild-plugins-pack

Weekly Downloads

485

Version

0.0.1

License

MIT

Unpacked Size

5.18 kB

Total Files

5

Last publish

Collaborators

  • massintha
  • thomas.jakemeyn
  • ugo.bechameil
  • pdesmarets