Merge pull request #14325 from bumbleblym/lodash-webpack-plugin

Add lodash-webpack-plugin
This commit is contained in:
Daniel Rosenwasser
2017-01-28 21:04:04 -08:00
committed by GitHub
4 changed files with 82 additions and 0 deletions

34
lodash-webpack-plugin/index.d.ts vendored Normal file
View File

@@ -0,0 +1,34 @@
// Type definitions for lodash-webpack-plugin 0.11
// Project: https://github.com/lodash/lodash-webpack-plugin#readme
// Definitions by: Benjamin Lim <https://github.com/bumbleblym>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Plugin, Webpack } from 'webpack';
export = LodashModuleReplacementPlugin;
declare class LodashModuleReplacementPlugin implements Plugin {
constructor(options?: LodashModuleReplacementPlugin.Options);
apply(thisArg: Webpack, ...args: any[]): void;
}
declare namespace LodashModuleReplacementPlugin {
export interface Options {
caching?: boolean;
chaining?: boolean;
cloning?: boolean;
coercions?: boolean;
collections?: boolean;
currying?: boolean;
deburring?: boolean;
exotics?: boolean;
flattening?: boolean;
guards?: boolean;
memoizing?: boolean;
metadata?: boolean;
paths?: boolean;
placeholders?: boolean;
shorthands?: boolean;
unicode?: boolean;
}
}

View File

@@ -0,0 +1,27 @@
import * as LodashModuleReplacementPlugin from 'lodash-webpack-plugin'
new LodashModuleReplacementPlugin()
new LodashModuleReplacementPlugin({
collections: true,
paths: true,
})
new LodashModuleReplacementPlugin({
caching: true,
chaining: true,
cloning: true,
coercions: true,
collections: true,
currying: true,
deburring: true,
exotics: true,
flattening: true,
guards: true,
memoizing: true,
metadata: true,
paths: true,
placeholders: true,
shorthands: true,
unicode: true,
})

View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"lodash-webpack-plugin-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "../tslint.json" }