New package: 'hard-source-webpack-plugin' (#26972)

* Add definitions to 'hard-source-webpack-plugin' package

* Run 'npm test'
This commit is contained in:
woitechen
2018-07-02 10:07:00 -07:00
committed by Mohamed Hegazy
parent 1188e75e66
commit 155be3a701
4 changed files with 66 additions and 0 deletions
@@ -0,0 +1,8 @@
import * as HardSourceWebpackPlugin from 'hard-source-webpack-plugin';
new HardSourceWebpackPlugin({
info: {
level: 'debug',
mode: 'test',
}
});
+34
View File
@@ -0,0 +1,34 @@
// Type definitions for hard-source-webpack-plugin 0.9
// Project: https://github.com/mzgoddard/hard-source-webpack-plugin#readme
// Definitions by: woitechen <https://github.com/woitechen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as webpack from 'webpack';
declare class hard_source_webpack_plugin {
constructor(options?: Options);
apply(...args: any[]): void;
}
declare namespace hard_source_webpack_plugin { }
interface Options {
cacheDirectory?: string;
configHash?: (webpackConfig?: webpack.Configuration) => string;
environmentHash?: {
root: string;
directories: string[];
files: string[];
};
info?: {
mode: 'none' | 'test';
level: 'debug' | 'log' | 'info' | 'warn' | 'error';
};
cachePrune?: {
maxAge: number;
sizeThreshold: number;
};
}
export = hard_source_webpack_plugin;
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"hard-source-webpack-plugin-tests.ts"
]
}
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }