npm.io
0.0.1 • Published 7 years ago

@jujorie/html-2-angularjs-plugin

Licence
ISC
Version
0.0.1
Deps
2
Size
11 kB
Vulns
1
Weekly
0

html-2-angularjs-plugin

Webpack plugin to extract html files to js

Table of contents

Installation

To install the plugin

$ npm install -D @jujorie/html-2-angularjs-plugin

Dependencies

This plugin depends on

Usage Example

Like webpack.config.js

const html2AngularjsPlugin = require('@jujorie/html-2-angularjs-plugin');

module.exports = {
    plugins: [
        new html2AngularjsPlugin({
            moduleName: 'app',
            filename: 'output.js',
            test: /\.html/,
            exclude: /index\.html/
        })
    ]
}

Options

Plugin options

  • filename Name of the generated file.

    default: 'template.js'

  • moduleName Name of the angular module

    default 'app'

  • test Regexp to find the html files

    default /.html/

  • exclude Regexp to select files to exclude

    default null