New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-elements-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

html-elements-webpack-plugin - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

5

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
## 1.0.0 - 2016-11-26
## 1.0.1 - 2016-11-26
- initial release
## 1.0.0 - 2016-11-26
- pre-release
## 0.0.1 - 2016-11-26
- pre-release

6

lib/html-elements-webpack-plugin.js

@@ -1,6 +0,6 @@

function HtmlElementsPlugin(locations) {
function HtmlElementsWebpackPlugin(locations) {
this.locations = locations;
}
HtmlElementsPlugin.prototype.apply = function(compiler) {
HtmlElementsWebpackPlugin.prototype.apply = function (compiler) {
var self = this;

@@ -114,2 +114,2 @@ compiler.plugin('compilation',

module.exports = HtmlElementsPlugin;
module.exports = HtmlElementsWebpackPlugin;
{
"name": "html-elements-webpack-plugin",
"version": "1.0.0",
"version": "1.0.1",
"description": "Webpack plugin to append head elements during the creation of index.html",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,3 @@

# html-elements-webpack-plugin [![npm version](https://badge.fury.io/js/html-elements-webpack-plugin.svg)](http://badge.fury.io/js/html-elements-webpack-plugin) [![npm downloads](https://img.shields.io/npm/dm/html-elements-webpack-plugin.svg)](https://npmjs.org/html-elements-webpack-plugin)
# html-elements-webpack-plugin
[![npm version](https://badge.fury.io/js/html-elements-webpack-plugin.svg)](http://badge.fury.io/js/html-elements-webpack-plugin) [![npm downloads](https://img.shields.io/npm/dm/html-elements-webpack-plugin.svg)](https://npmjs.org/html-elements-webpack-plugin)

@@ -68,3 +69,3 @@ This repository holds the JavaScript source code and distributable bundle of **`html-elements-webpack-plugin`**, the webpack plugin to append head elements during the creation of `index.html` with the source code is copied from [AngularClass/angular2-webpack-starter](https://github.com/AngularClass/angular2-webpack-starter).

```JavaScript
const HtmlElementsPlugin = require('html-elements-webpack-plugin');
const HtmlElementsWebpackPlugin = require('html-elements-webpack-plugin');

@@ -76,3 +77,3 @@ module.exports = {

/*
* Plugin: HtmlElementsPlugin
* Plugin: HtmlElementsWebpackPlugin
* Description: Generate html tags based on javascript maps.

@@ -89,3 +90,3 @@ *

* Adding this plugin configuration
* new HtmlElementsPlugin({
* new HtmlElementsWebpackPlugin({
* headTags: { ... }

@@ -99,3 +100,3 @@ * })

*/
new HtmlElementsPlugin({
new HtmlElementsWebpackPlugin({
headTags: require('./head-config')

@@ -109,2 +110,22 @@ }),

#### index.html
```html
<!DOCTYPE html>
<head>
<base href="/">
<meta charset="utf-8" />
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport" />
<% if (webpackConfig.htmlElements.headTags) { %>
<!-- Configured Head Tags -->
<%= webpackConfig.htmlElements.headTags %>
<% } %>
</head>
<body>
<main>Loading...</main>
</body>
</html>
```
Awesome! **`html-elements-webpack-plugin`** will now append the head elements specified in `head-config.js` during the creation of `index.html`:

@@ -111,0 +132,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc