Skip to content

Updated typings #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
Latest version of this document will always be available on https://github.com/SimenB/add-asset-html-webpack-plugin/releases

## [Unreleased]
Nothing
- Fix TypeScript definition file
- Allows an array of options in the plugin constructor
- Added `files` property to options

## [2.1.1] - 2017-08-16
### Fixes
Expand Down
9 changes: 8 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ declare namespace AddAssetHtmlPlugin {
*/
filepath: string;

/**
* Files that the assets will be added to.
* By default the assets will be included in all files. If files are defined, the
* assets will only be included in specified file globs.
*/
files?: string | string[];

/**
* If true, will append a unique hash of the file to the filename. This is useful for cache busting.
* Default false.
Expand Down Expand Up @@ -37,7 +44,7 @@ declare namespace AddAssetHtmlPlugin {
}

declare class AddAssetHtmlPlugin {
constructor(options: AddAssetHtmlPlugin.Options);
constructor(options: AddAssetHtmlPlugin.Options | AddAssetHtmlPlugin.Options[]);
apply(compiler: any): void;
}

Expand Down