@types/copy-webpack-plugin
Advanced tools
Comparing version 5.0.1 to 6.0.0
@@ -1,24 +0,20 @@ | ||
// Type definitions for copy-webpack-plugin 5.0 | ||
// Type definitions for copy-webpack-plugin 6.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> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
/// <reference types="node"/> | ||
import { Plugin, compiler } from 'webpack' | ||
import { IOptions } from 'minimatch' | ||
import { Plugin } from 'webpack'; | ||
interface MiniMatchGlob extends IOptions { | ||
glob: string | ||
} | ||
interface ObjectPattern { | ||
/** | ||
* File source path or glob | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#from} | ||
* @default undefined | ||
*/ | ||
from: string; | ||
interface MiniMatchOptions extends IOptions { | ||
cwd?: string | ||
} | ||
interface CopyPattern { | ||
/** File source path or glob */ | ||
from: string | MiniMatchGlob | ||
/** | ||
@@ -28,68 +24,95 @@ * Path or webpack file-loader patterns. defaults: | ||
* resolved glob path if `from` is glob. | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#to} | ||
* @default compiler.options.output | ||
*/ | ||
to?: string | ||
/** A path that determines how to interpret the `from` path. | ||
* | ||
* (default: `options.context | compiler.options.context`) | ||
* */ | ||
context?: string | ||
to?: string; | ||
/** | ||
* A path that determines how to interpret the `from` path. | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#context} | ||
* @default options.context | compiler.options.context | ||
*/ | ||
context?: string; | ||
/** | ||
* Allows to configure the glob pattern matching library used by the plugin. | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#globoptions} | ||
*/ | ||
globOptions?: object; | ||
/** | ||
* 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. | ||
* @default undefined | ||
*/ | ||
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> | ||
toType?: 'file' | 'dir' | 'template'; | ||
/** | ||
* Overwrites files already in `compilation.assets` (usually added by other plugins. | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#force} | ||
* @default false | ||
*/ | ||
force?: boolean; | ||
/** | ||
* Removes all directory references and only copies file names. (default: `false`) | ||
* | ||
* If files have the same name, the result is non-deterministic. | ||
* If files have the same name, the result is non-deterministic. | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#flatten} | ||
* @default false | ||
*/ | ||
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 } | ||
/** | ||
flatten?: boolean; | ||
/** | ||
* Function that modifies file contents before writing to webpack. (default: `(content, path) => content`) | ||
* {@link https://webpack.js.org/plugins/copy-webpack-plugin/#transform} | ||
* @default undefined | ||
*/ | ||
transform?: (content: Buffer, absoluteFrom: string) => string | Buffer | Promise<string | Buffer>; | ||
/** | ||
* Enable/disable and configure caching. Default path to cache directory: node_modules/.cache/copy-webpack-plugin. | ||
* @default false | ||
*/ | ||
cacheTransform?: boolean | string | object; | ||
/** | ||
* Allows to modify the writing path. | ||
* | ||
* Returns the new path or a promise that resolves into the new path | ||
* Returns the new path or a promise that resolves into the new path | ||
* @default undefined | ||
*/ | ||
transformPath?: (targetPath: string, absolutePath: string) => string | Promise<string> | ||
transformPath?: (targetPath: string, absolutePath: string) => string | Promise<string>; | ||
/** | ||
* Doesn't generate an error on missing file(s); | ||
* @default false | ||
*/ | ||
noErrorOnMissing?: boolean; | ||
} | ||
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 | ||
type StringPattern = string; | ||
interface Options { | ||
/** | ||
* Limits the number of simultaneous requests to fs | ||
* @default 100 | ||
*/ | ||
concurrency?: number; | ||
} | ||
interface CopyWebpackPlugin { | ||
new (patterns?: (string | CopyPattern)[], options?: CopyWebpackPluginConfiguration): Plugin | ||
interface CopyPluginOptions { | ||
patterns: ReadonlyArray<StringPattern | ObjectPattern>; | ||
options?: Options; | ||
} | ||
declare const copyWebpackPlugin: CopyWebpackPlugin | ||
export = copyWebpackPlugin | ||
interface CopyPlugin { | ||
new (options?: CopyPluginOptions): Plugin; | ||
} | ||
/** | ||
* Copy files and directories with webpack | ||
*/ | ||
declare const copyWebpackPlugin: CopyPlugin; | ||
export = copyWebpackPlugin; |
{ | ||
"name": "@types/copy-webpack-plugin", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "TypeScript definitions for copy-webpack-plugin", | ||
@@ -8,3 +8,3 @@ "license": "MIT", | ||
{ | ||
"name": " flying-sheep", | ||
"name": "flying-sheep", | ||
"url": "https://github.com/flying-sheep", | ||
@@ -17,2 +17,7 @@ "githubUsername": "flying-sheep" | ||
"githubUsername": "avin-kavish" | ||
}, | ||
{ | ||
"name": "Piotr Błażejewicz ", | ||
"url": "https://github.com/peterblazejewicz", | ||
"githubUsername": "peterblazejewicz" | ||
} | ||
@@ -29,8 +34,7 @@ ], | ||
"dependencies": { | ||
"@types/minimatch": "*", | ||
"@types/node": "*", | ||
"@types/webpack": "*" | ||
}, | ||
"typesPublisherContentHash": "14992140f4bd53ffc71ff2789b066d92d366c01aeb35aee8d46928ff2b066ec5", | ||
"typesPublisherContentHash": "87c5dab3afdbf694f86503d00d1cdd2f0ccb7a983443155a50c7472ff68b6179", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
### 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) | ||
* Last updated: Thu, 28 May 2020 00:15:23 GMT | ||
* Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack), [@types/node](https://npmjs.com/package/@types/node) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [ flying-sheep](https://github.com/flying-sheep), and [avin-kavish ](https://github.com/avin-kavish). | ||
These definitions were written by [flying-sheep](https://github.com/flying-sheep), [avin-kavish ](https://github.com/avin-kavish), and [Piotr Błażejewicz ](https://github.com/peterblazejewicz). |
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
6653
2
98
- Removed@types/minimatch@*
- Removed@types/minimatch@5.1.2(transitive)