@types/copy-webpack-plugin
Advanced tools
Comparing version 5.0.0 to 5.0.1
// 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> | ||
// avin-kavish <https://github.com/avin-kavish> | ||
// Definitions by: flying-sheep <https://github.com/flying-sheep> | ||
// avin-kavish <https://github.com/avin-kavish> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -14,75 +14,75 @@ // TypeScript Version: 2.3 | ||
interface MiniMatchGlob extends IOptions { | ||
glob: string | ||
glob: string | ||
} | ||
interface MiniMatchOptions extends IOptions { | ||
cwd?: string | ||
cwd?: string | ||
} | ||
interface CopyPattern { | ||
/** File source path or glob */ | ||
from: string | MiniMatchGlob | ||
/** | ||
* Path or webpack file-loader patterns. defaults: | ||
* output root if `from` is file or dir. | ||
* resolved glob path if `from` is glob. | ||
*/ | ||
to?: string | ||
/** A path that determines how to interpret the `from` path. | ||
* | ||
* (default: `options.context | compiler.options.context`) | ||
* */ | ||
context?: string | ||
/** | ||
* 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' | ||
/** | ||
* 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. (default: `false`) | ||
* | ||
* If files have the same name, the result is non-deterministic. | ||
*/ | ||
flatten?: boolean | ||
/** Function that modifies file contents before writing to webpack. (default: `(content, path) => content`) */ | ||
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 } | ||
/** | ||
* 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> | ||
/** File source path or glob */ | ||
from: string | MiniMatchGlob | ||
/** | ||
* Path or webpack file-loader patterns. defaults: | ||
* output root if `from` is file or dir. | ||
* resolved glob path if `from` is glob. | ||
*/ | ||
to?: string | ||
/** A path that determines how to interpret the `from` path. | ||
* | ||
* (default: `options.context | compiler.options.context`) | ||
* */ | ||
context?: string | ||
/** | ||
* 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' | ||
/** | ||
* 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. (default: `false`) | ||
* | ||
* If files have the same name, the result is non-deterministic. | ||
*/ | ||
flatten?: boolean | ||
/** Function that modifies file contents before writing to webpack. (default: `(content, path) => content`) */ | ||
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 } | ||
/** | ||
* 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 { | ||
/** 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 | ||
/** 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 | ||
} | ||
@@ -89,0 +89,0 @@ |
{ | ||
"name": "@types/copy-webpack-plugin", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "TypeScript definitions for copy-webpack-plugin", | ||
@@ -8,3 +8,3 @@ "license": "MIT", | ||
{ | ||
"name": "\tflying-sheep", | ||
"name": " flying-sheep", | ||
"url": "https://github.com/flying-sheep", | ||
@@ -20,3 +20,3 @@ "githubUsername": "flying-sheep" | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -33,4 +33,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "1de43bc5adb03fded3ba954ecb8b2c64a0038fb13bd97e92af681a621dbad3c9", | ||
"typeScriptVersion": "2.3" | ||
"typesPublisherContentHash": "14992140f4bd53ffc71ff2789b066d92d366c01aeb35aee8d46928ff2b066ec5", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -5,13 +5,13 @@ # Installation | ||
# Summary | ||
This package contains type definitions for copy-webpack-plugin ( https://github.com/webpack-contrib/copy-webpack-plugin ). | ||
This package contains type definitions for copy-webpack-plugin (https://github.com/webpack-contrib/copy-webpack-plugin). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/copy-webpack-plugin | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/copy-webpack-plugin. | ||
Additional Details | ||
* Last updated: Fri, 26 Apr 2019 18:12:15 GMT | ||
* Dependencies: @types/webpack, @types/minimatch, @types/node | ||
### Additional Details | ||
* Last updated: Fri, 15 May 2020 04:08:58 GMT | ||
* Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack), [@types/minimatch](https://npmjs.com/package/@types/minimatch), [@types/node](https://npmjs.com/package/@types/node) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by flying-sheep <https://github.com/flying-sheep>, avin-kavish <https://github.com/avin-kavish>. | ||
These definitions were written by [ flying-sheep](https://github.com/flying-sheep), and [avin-kavish ](https://github.com/avin-kavish). |
Sorry, the diff of this file is not supported yet
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
6625