1.0.7 • Published 1 year ago

esm-build v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

esm-imports-builder

Copies every file from source folder to output folder while adding hash versioning (cache busting) to all import statements in ESM modules. Modifies all .js files in output folder.

Create a config.json file with source and output folder. Example:

{
    "sourcedir": "./src",
    "outputdir": "./build",
    "excludes": [
        "*/ignoredfolder/**"
    ],
    "cleanOutput": false
}

If "outputdir" is omitted from the config file, the original files in the source folder will be modified in place.

If "excludes" is included, i should contain an array of glob patterns to exclude files/folders.

"cleanOutput": true - deletes output folder with all contents if "outputdir" is defined.

Execute with:

> npm run build

or

> esm-build

Arguments:

-c [path to config file]

With arguments:

> npm build -- -c buildconfig.json

or

> esm-build -- -c buildconfig.json
1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago