@types/copy-webpack-plugin
Advanced tools
Comparing version 4.4.4 to 5.0.0
@@ -1,4 +0,5 @@ | ||
// Type definitions for copy-webpack-plugin 4.4 | ||
// Type definitions for copy-webpack-plugin 5.0 | ||
// Project: https://github.com/webpack-contrib/copy-webpack-plugin | ||
// Definitions by: flying-sheep <https://github.com/flying-sheep> | ||
// Definitions by: flying-sheep <https://github.com/flying-sheep> | ||
// avin-kavish <https://github.com/avin-kavish> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -9,3 +10,3 @@ // TypeScript Version: 2.3 | ||
import { Plugin } from 'webpack' | ||
import { Plugin, compiler } from 'webpack' | ||
import { IOptions } from 'minimatch' | ||
@@ -24,4 +25,2 @@ | ||
from: string | MiniMatchGlob | ||
/** See the `node-glob` options in addition to the ones below. (default: `{ cwd: context }`) */ | ||
fromArgs?: MiniMatchOptions | ||
/** | ||
@@ -33,34 +32,59 @@ * Path or webpack file-loader patterns. defaults: | ||
to?: string | ||
/** A path that determines how to interpret the `from` path. | ||
* | ||
* (default: `options.context | compiler.options.context`) | ||
* */ | ||
context?: string | ||
/** | ||
* How to interpret `to`. defaults: | ||
* 'file' if to has extension or from is file. | ||
* 'dir' if from is directory, to has no extension or ends in '/'. | ||
* 'template' if to contains a template pattern. | ||
* How to interpret `to`. default: undefined | ||
* | ||
* `file` - if 'to' has extension or 'from' is file. | ||
* `dir` - if 'from' is directory, 'to' has no extension or ends in '/'. | ||
* `template` - if 'to' contains a template pattern. | ||
*/ | ||
toType?: 'file' | 'dir' | 'template' | ||
/** A path that determines how to interpret the `from` path. (default: `compiler.options.context`) */ | ||
context?: string | ||
/** | ||
* Pattern for extracting elements to be used in `to` templates. | ||
* | ||
* Defines a `RegExp` to match some parts of the file path. These capture groups can be reused in the name property using [N] | ||
* placeholder. Note that [0] will be replaced by the entire path of the file, whereas [1] will contain the first capturing | ||
* parenthesis of your RegExp and so on... | ||
* | ||
* */ | ||
test?: RegExp | ||
/** Overwrites files already in `compilation.assets` (usually added by other plugins; default: `false`) */ | ||
force?: boolean | ||
/** Additional globs to ignore for this pattern. (default: `[]`) */ | ||
ignore?: Array<string | MiniMatchGlob> | ||
/** | ||
* Removes all directory references and only copies file names. | ||
* Removes all directory references and only copies file names. (default: `false`) | ||
* | ||
* If files have the same name, the result is non-deterministic. (default: `false`) | ||
* If files have the same name, the result is non-deterministic. | ||
*/ | ||
flatten?: boolean | ||
/** Additional globs to ignore for this pattern. (default: `[]`) */ | ||
ignore?: Array<string | MiniMatchGlob> | ||
/** Function that modifies file contents before writing to webpack. (default: `(content, path) => content`) */ | ||
transform?: (content: Buffer, path: string) => string | Buffer | ||
/** Enable transform caching. You can use `{ cache: { key: 'my-cache-key' } }` to invalidate the cache. (default: `false`) */ | ||
transform?: (content: Buffer, path: string) => string | Buffer | Promise<string | Buffer> | ||
/** | ||
* Enable transform caching. (default: `false`) | ||
* | ||
* You can use `{ key: 'my-cache-key' }` to invalidate the cache. | ||
* */ | ||
cache?: boolean | { key: string } | ||
/** Overwrites files already in `compilation.assets` (usually added by other plugins; default: `false`) */ | ||
force?: boolean | ||
/** | ||
* Allows to modify the writing path. | ||
* | ||
* Returns the new path or a promise that resolves into the new path | ||
*/ | ||
transformPath?: (targetPath: string, absolutePath: string) => string | Promise<string> | ||
} | ||
interface CopyWebpackPluginConfiguration { | ||
/** Array of globs to ignore. (applied to from; default: `[]`) */ | ||
/** Level of messages that the module will log. (default: `'warn'`) */ | ||
logLevel?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | ||
/** Array of globs to ignore. (applied to `from`; default: `[]`) */ | ||
ignore?: Array<string | MiniMatchGlob> | ||
/** A path that determines how to interpret the from path, shared for all patterns. default: `'compiler.options.context'` */ | ||
context?: string | ||
/** Copies files, regardless of modification when using `watch` or `webpack-dev-server`. All files are copied on first build, regardless of this option. (default: `false`) */ | ||
copyUnmodified?: boolean | ||
/** Debug level. warning: only warnings, info/true: file location and read info, debug: very detailed debugging info. (default: `'warning'`) */ | ||
debug?: 'warning' | 'info'|true | 'debug' | ||
} | ||
@@ -67,0 +91,0 @@ |
{ | ||
"name": "@types/copy-webpack-plugin", | ||
"version": "4.4.4", | ||
"version": "5.0.0", | ||
"description": "TypeScript definitions for copy-webpack-plugin", | ||
@@ -8,5 +8,10 @@ "license": "MIT", | ||
{ | ||
"name": "flying-sheep", | ||
"name": "\tflying-sheep", | ||
"url": "https://github.com/flying-sheep", | ||
"githubUsername": "flying-sheep" | ||
}, | ||
{ | ||
"name": "avin-kavish ", | ||
"url": "https://github.com/avin-kavish", | ||
"githubUsername": "avin-kavish" | ||
} | ||
@@ -27,4 +32,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "7f03b28211a2c1c1ca91583f1746859a91438ba8a231e81bbec1bdf2167a7277", | ||
"typesPublisherContentHash": "1de43bc5adb03fded3ba954ecb8b2c64a0038fb13bd97e92af681a621dbad3c9", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 15 Apr 2019 19:58:20 GMT | ||
* Last updated: Fri, 26 Apr 2019 18:12:15 GMT | ||
* Dependencies: @types/webpack, @types/minimatch, @types/node | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by flying-sheep <https://github.com/flying-sheep>. | ||
These definitions were written by flying-sheep <https://github.com/flying-sheep>, avin-kavish <https://github.com/avin-kavish>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6307
86