New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

include-file-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

include-file-webpack-plugin

Plugin to include files in html templates

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
8
-46.67%
Maintainers
1
Weekly downloads
 
Created
Source

This plugin is my version of include-replace-webpack-plugin ( https://github.com/justkidding96/include-replace-webpack-plugin )

Repository url: ( https://github.com/krzys1u/include-file-webpack-plugin )

Include file

Use @@include('path_to_file') to place here content of file.

Using with webpack

const IncludeFileWebpackPlugin = require('include-file-webpack-plugin');

plugins: [
    new IncludeFileWebpackPlugin(config)
]

config options:

const config = {
    directory: './public/', //path to directory with files
    input: 'input.html',
    output: 'output.html',
    processIncludeContents: function(html) {
        return html;
    }
}
directory: path where files should be looked for
input: input file to process
output: output file generated from plugin
processIncludeContents: (optional) function used for processing each included file

this config checks /public/input.html to find @@include tags and replace it with content of their files, next save results in /public/output.html, all pathes to including files will be read from path /public/

License

Include and replace is open-sourced software licensed under the MIT license.

FAQs

Package last updated on 19 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts