typed-directory-webpack-plugin
v1.0.1
Published
Webpack plugin used to integrate typed-directory module
Downloads
2
Readme
Typed directory webpack plugin
Webpack plugin used to integrate typed-directory module.
Installation
npm install --save-dev typed-directory typed-directory-webpack-plugin
Usage
// webpack.config.js
const TypedDirectoryWebpackPlugin = require("typed-directory-webpack-plugin");
const path = require("path");
module.exports = {
entry: "./src/main.ts",
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js"
},
module: {
rules: [
{
test: /\.ts$/,
loader: "awesome-typescript-loader"
}
]
},
resolve: {
extensions: [ ".ts", ".js" ]
},
plugins: [
// No arguments so use default config file
new TypedDirectoryWebpackPlugin()
]
}
Parameters
The plugin use the same parameters as the plain typed-directory
module.
See the original module documentation to know how to use it.
Tests
The tests can be run by using the test command:
npm run test
Coverage data can also be generated by running the coverage command:
npm run coverage
To view the coverage report, open coverage/lcov-report/index.html
in the browser of your choice.