New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 0.3.0 to 0.3.1

test/expected/config.js

4

package.json
{
"name": "gulp-ejs",
"version": "0.3.0",
"version": "0.3.1",
"description": "A plugin for Gulp that parses ejs template files",

@@ -27,3 +27,3 @@ "keywords": [

"ejs": "^1.0.0",
"gulp-util": "^2.2.17",
"gulp-util": "^3.0.0",
"through2": "^0.5.1"

@@ -30,0 +30,0 @@ },

@@ -158,2 +158,65 @@ /*global describe, it*/

})
describe('with assets', function () {
it('should templating with javascripts', function (done) {
var srcFile = new gutil.File({
path: 'test/fixtures/config.js.ejs',
cwd: 'test/',
base: 'test/fixtures',
contents: fs.readFileSync('test/fixtures/config.js.ejs')
});
var stream = ejs({
baseUrl: 'https://github.com/rogeriopvl/gulp-ejs',
FacebookApiToken: function () {
return '0e24aa7fa3d7acffdb2085cec5ab0ce704f48318';
}
}, {
ext: ''// remove .ejs extension
});
stream.on('data', function (newFile) {
should.exist(newFile);
should.exist(newFile.contents);
path.extname(newFile.path).should.equal('.js')
String(newFile.contents).should.equal(fs.readFileSync('test/expected/config.js', 'utf8'));
done();
});
stream.write(srcFile);
stream.end();
});
it('should templating with stylesheets', function (done) {
var srcFile = new gutil.File({
path: 'test/fixtures/head.css.ejs',
cwd: 'test/',
base: 'test/fixtures',
contents: fs.readFileSync('test/fixtures/head.css.ejs')
});
var stream = ejs({
fonts_path: function () {
return '../fonts/fontawesome-webfont.eot?v=4.1.0';
}
}, {
ext: ''// remove .ejs extension
});
stream.on('data', function (newFile) {
should.exist(newFile);
should.exist(newFile.contents);
path.extname(newFile.path).should.equal('.css')
String(newFile.contents).should.equal(fs.readFileSync('test/expected/head.css', 'utf8'));
done();
});
stream.write(srcFile);
stream.end();
});
});
});
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