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

grunt-includes

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-includes - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

2

package.json
{
"name": "grunt-includes",
"description": "Include other files within a file.",
"version": "0.3.3",
"version": "0.3.4",
"author": "vanetix <matmcfarland@gmail.com>",

@@ -6,0 +6,0 @@ "main": "Gruntfile.js",

@@ -15,2 +15,4 @@ # grunt-includes [![Build Status](https://travis-ci.org/vanetix/grunt-includes.png?branch=master)](https://travis-ci.org/vanetix/grunt-includes)

An example site can be found at [grunt-includes-example](https://github.com/vanetix/grunt-includes-example).
## Options

@@ -42,2 +44,8 @@

#### includePath
Type: `String`
Default: ``
Indicates the path to use when looking for included files. Instead of using relative path in the include statements, use includePath as base directory.
#### includeRegexp

@@ -136,2 +144,3 @@ Type: `RegExp`

## Release History
- 0.3.4 - Add explicit include path option.
- 0.3.2 - Add silent flag to silence save messages.

@@ -138,0 +147,0 @@ - 0.3.0 - Add indention preservation and banner support

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

duplicates: true,
includeRegexp: defaultRegexp
includeRegexp: defaultRegexp,
includePath: ''
});

@@ -143,4 +144,10 @@

function recurse(p, opts, included, indents) {
var src, next, match, error, comment, newline, compiled, indent, fileLocation;
var src, next, match, error, comment,
newline, compiled, indent, fileLocation;
if(!grunt.file.isFile(p)) {
grunt.log.warn('Included file "' + p + '" not found.');
return 'Error including "' + p + '".';
}
indents = indents || '';

@@ -151,7 +158,2 @@ comment = commentStyle(p);

if(!grunt.file.isFile(p)) {
grunt.log.warn('Included file "' + p + '" not found.');
return 'Error including "' + p + '".';
}
/**

@@ -205,3 +207,3 @@ * If `opts.duplicates` is false and file has been included,

next = path.join(path.dirname(p), fileLocation);
next = path.join((opts.includePath || path.dirname(p)), fileLocation);
line = recurse(next, opts, included, indents + indent);

@@ -208,0 +210,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