Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-processhtml

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-processhtml - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

2

package.json
{
"name": "grunt-processhtml",
"description": "Process html files at build time to modify them depending on the release environment",
"version": "0.2.6",
"version": "0.2.7",
"homepage": "https://github.com/dciccale/grunt-processhtml",

@@ -6,0 +6,0 @@ "author": {

@@ -240,2 +240,18 @@ # grunt-processhtml [![Build Status](https://travis-ci.org/dciccale/grunt-processhtml.png?branch=master)](https://travis-ci.org/dciccale/grunt-processhtml) [![NPM version](https://badge.fury.io/js/grunt-processhtml.png)](http://badge.fury.io/js/grunt-processhtml)

#### options.commentMarker
Type: `String`
Default value: `build`
Specify the word used to indicate the special begin/end comments. This is useful if you want to use this plugin
in conjuction with other plugins that use a similar, conflicting `build:<type>` comment
(such as [grunt-usemin](https://github.com/yeoman/grunt-usemin)).
With `options.commentMarker` set to `process`, a typical comment would look like:
```html
<!-- process:<type>[:target] [value] -->
...
<!-- /process -->
```
### Usage Examples

@@ -417,2 +433,4 @@

## Release History
- 0.2.6 Fix #14 and added grunt-release
- 0.2.5 Create first tag using grunt-release
- 0.2.3 Fix #8

@@ -419,0 +437,0 @@ - 0.2.2 Small code refactor

@@ -16,3 +16,3 @@ /*

var getBlocks = function (content) {
var getBlocks = function (content, marker) {
/*

@@ -24,5 +24,5 @@ * <!-- build:<type>[:target] [value] -->

*/
var regbuild = /<!--\s*build:(\[?[\w-]+\]?)(?::(\w+))?(?:\s*([^\s]+)\s*-->)*/;
var regbuild = new RegExp('<!--\\s*' + marker + ':(\\[?[\\w-]+\\]?)(?::(\\w+))?(?:\\s*([^\\s]+)\\s*-->)*');
// <!-- /build -->
var regend = /(?:<!--\s*)*\/build\s*-->/;
var regend = new RegExp('(?:<!--\\s*)*\\/' + marker + '\\s*-->');
// normalize line endings and split in lines

@@ -119,3 +119,3 @@ var lines = content.replace(/\r\n/g, '\n').split(/\n/);

this.linefeed = /\r\n/g.test(content) ? '\r\n' : '\n';
this.blocks = getBlocks(content);
this.blocks = getBlocks(content, options.commentMarker);
this.blockTypes = getBlockTypes(options, filePath);

@@ -122,0 +122,0 @@ };

@@ -21,3 +21,4 @@ /*

data: {},
templateSettings: null
templateSettings: null,
commentMarker: 'build'
});

@@ -24,0 +25,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