Skip to content

polopelletier/typed-directory-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.