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

gulp-vdt

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-vdt - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

20

index.js

@@ -19,4 +19,5 @@ var through = require('through2'),

options = extend({
amd: true,
autoReturn: true
format: 'amd',
autoReturn: true,
onlySource: true
}, options);

@@ -36,5 +37,16 @@

var contents = Vdt.compile(file.contents.toString(), options).source;
if (options.amd) {
var fn = Vdt.compile(file.contents.toString(), options);
var contents = fn.source;
var pos = contents.indexOf('\n');
if (options.amd === false) {
options.format = '';
}
if (options.format === 'amd') {
contents = 'define(function(require) {\n return ' + contents + '\n})';
} else if (options.format === 'cjs') {
contents = [
fn.head || '',
'module.exports = ' + contents.substr(0, pos),
contents.substr(pos)
].join('\n');
}

@@ -41,0 +53,0 @@

{
"name": "gulp-vdt",
"description": "a plugin of gulp for compiling vdt template",
"version": "0.1.0",
"version": "0.2.0",
"main": "index.js",

@@ -19,4 +19,5 @@ "repository": {

"devDependencies": {
"gulp": "^3.9.0"
"gulp": "^3.9.0",
"vdt": "^1.1.2-22"
}
}
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