1.0.1 • Published 6 years ago

typed-directory-webpack-plugin v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Typed directory webpack plugin

NPM version Build Status

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.