Comparing version 3.1.0 to 3.1.1
'use strict' | ||
var through = require('through2') | ||
var gutil = require('gulp-util') | ||
var PluginError = require('plugin-error') | ||
var replaceExtension = require('replace-ext') | ||
var ejs = require('ejs') | ||
@@ -23,3 +24,3 @@ var assign = require('object-assign') | ||
'error', | ||
new gutil.PluginError('gulp-ejs', 'Streaming not supported') | ||
new PluginError('gulp-ejs', 'Streaming not supported') | ||
) | ||
@@ -37,6 +38,6 @@ } | ||
if (typeof settings.ext !== 'undefined') { | ||
file.path = gutil.replaceExtension(file.path, settings.ext) | ||
file.path = replaceExtension(file.path, settings.ext) | ||
} | ||
} catch (err) { | ||
this.emit('error', new gutil.PluginError('gulp-ejs', err.toString())) | ||
this.emit('error', new PluginError('gulp-ejs', err.toString())) | ||
} | ||
@@ -43,0 +44,0 @@ |
{ | ||
"name": "gulp-ejs", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "A plugin for Gulp that parses ejs template files", | ||
@@ -28,4 +28,5 @@ "keywords": [ | ||
"ejs": "2.5.7", | ||
"gulp-util": "3.0.8", | ||
"object-assign": "^4.1.0", | ||
"plugin-error": "^0.1.2", | ||
"replace-ext": "^1.0.0", | ||
"safe-buffer": "^5.0.1", | ||
@@ -35,5 +36,6 @@ "through2": "2.0.3" | ||
"devDependencies": { | ||
"mocha": "4.0.1", | ||
"should": "13.1.3", | ||
"standard": "^10.0.0" | ||
"mocha": "4.1.0", | ||
"should": "13.2.0", | ||
"standard": "^10.0.0", | ||
"vinyl": "^2.1.0" | ||
}, | ||
@@ -40,0 +42,0 @@ "engines": { |
@@ -31,3 +31,3 @@ # gulp-ejs [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] | ||
var ejs = require('gulp-ejs') | ||
var gutil = require('gulp-util') | ||
var log = require('fancy-log') | ||
@@ -37,3 +37,3 @@ gulp.src('./templates/*.ejs') | ||
msg: 'Hello Gulp!' | ||
}).on('error', gutil.log)) | ||
}).on('error', log)) | ||
.pipe(gulp.dest('./dist')) | ||
@@ -49,6 +49,3 @@ ``` | ||
gulp.src('./templates/*.ejs') | ||
.pipe(ejs({ | ||
msg: 'Hello Gulp!', | ||
ext: '.html' | ||
}) | ||
.pipe(ejs({ msg: 'Hello Gulp!'}, {}, { ext: '.html' })) | ||
.pipe(gulp.dest('./dist')) | ||
@@ -55,0 +52,0 @@ ``` |
/* global describe, it */ | ||
'use strict' | ||
require('mocha') | ||
var fs = require('fs') | ||
var should = require('should') | ||
var path = require('path') | ||
require('mocha') | ||
var Vinyl = require('vinyl') | ||
var gutil = require('gulp-util') | ||
var ejs = require('../') | ||
describe('gulp-ejs', function () { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: 'test/expected/output.html', | ||
@@ -20,3 +21,3 @@ cwd: 'test/', | ||
var expectedFileWithPartial = new gutil.File({ | ||
var expectedFileWithPartial = new Vinyl({ | ||
path: 'test/expected/outputWithPartial.html', | ||
@@ -33,3 +34,3 @@ cwd: 'test/', | ||
it('should produce correct html output when rendering a file', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/ok.ejs', | ||
@@ -63,3 +64,3 @@ cwd: 'test/', | ||
it('should throw error when syntax is incorrect', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/nok.ejs', | ||
@@ -83,3 +84,3 @@ cwd: 'test/', | ||
it('should produce correct html output with a specific file extension', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/ok.ejs', | ||
@@ -113,3 +114,3 @@ cwd: 'test/', | ||
it('should produce correct html output using partial', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/withpartial.ejs', | ||
@@ -136,3 +137,3 @@ cwd: 'test/', | ||
it('should support passing data with gulp-data', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/ok.ejs', | ||
@@ -169,3 +170,3 @@ cwd: 'test/', | ||
it('should merge options and file.data when both are passed', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/withpartial.ejs', | ||
@@ -201,3 +202,3 @@ cwd: 'test/', | ||
it('should templating with javascripts', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/config.js.ejs', | ||
@@ -234,3 +235,3 @@ cwd: 'test/', | ||
it('should templating with stylesheets', function (done) { | ||
var srcFile = new gutil.File({ | ||
var srcFile = new Vinyl({ | ||
path: 'test/fixtures/head.css.ejs', | ||
@@ -237,0 +238,0 @@ cwd: 'test/', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14859
248
6
4
108
2
+ Addedplugin-error@^0.1.2
+ Addedreplace-ext@^1.0.0
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@2.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedextend-shallow@1.1.4(transitive)
+ Addedkind-of@1.1.0(transitive)
+ Addedplugin-error@0.1.2(transitive)
+ Addedreplace-ext@1.0.1(transitive)
- Removedgulp-util@3.0.8
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedvinyl@0.5.3(transitive)