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

gulp-ejs

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-ejs - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

9

index.js
'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/',

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