open-index/open-npm huggingface dataset:
npm package: @hscmap/assets-installer-plugin
Description: ## Introduction We can use webpack's library mode for creating a commonjs package. Let's assume that we created a package named 'myPackage'. To use this package from consumer side, simply do "require('myPackage')".
Author: Koike Michitaro
Latest version: 2.0.0
Deprecated: no longer maintained

# Assets Installer Plugin

## Introduction
We can use webpack's library mode for creating a commonjs package.
Let's assume that we created a package named 'myPackage'.
To use this package from consumer side, simply do "require('myPackage')".

However, if the package requires files other than main entry point,
that are emitted by loaders such as file-loader and worker-loader,
it is necessary to make those files in "dist" directory in the consumer side.

This webpack plugin copies the files that was emitted by file-loader, worker-loader, etc. to "dist" directory of the consumer side.

# Example
```javascript
const AssetsInstallerPlugin = require('@hscmap/assets-installer-plugin')

module.exports = {
    ...,
    plugins: [
        new AssetsInstallerPlugin({
            files: [
                ['@hscmap/stellar-globe', '{*.json,*.worker.js}']
            ]
        })
    ]
}
```


# Reference
## Options
* ```files: [string, string][]```
  * specifies files to copy
  * 1st item of each entry stands for name of the module
  * 2nd item of each entry stands for patterns of files to copy (default: '{*.json,*.worker.js}')
* ```always: boolean (default: false)```
  * if true, copy files on every compilation
  * if no, copy files once upon starting webpack