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

can-compile

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-compile - npm Package Compare versions

Comparing version 0.10.2 to 0.11.0

test.out

1

lib/index.js

@@ -12,2 +12,3 @@ 'use strict';

files = Array.isArray(files) ? files : [files];
// Normalize ids to filenames relative to the output file

@@ -14,0 +15,0 @@ var normalizer = configuration.normalizer || function(filename) {

17

lib/resolveScripts.js

@@ -6,8 +6,17 @@ var path = require('path');

Handlebars.registerHelper("systemifv2", function(version) {
if(version[0] === "2") {
return ".system";
} else {
return "";
}
});
var defaultPaths = {
'jquery': Handlebars.compile('http://ajax.googleapis.com/ajax/libs/jquery/{{version}}/jquery.min.js'),
'can': Handlebars.compile('http://canjs.com/release/{{version}}/can.jquery.js'),
'ejs': Handlebars.compile('http://canjs.com/release/{{version}}/can.ejs.js'),
'mustache': Handlebars.compile('http://canjs.com/release/{{version}}/can.view.mustache.js'),
'stache': Handlebars.compile('http://canjs.com/release/{{version}}/can.stache.js')
'can': Handlebars.compile('http://v2.canjs.com/release/{{version}}/can.jquery.js'),
'ejs': Handlebars.compile('http://v2.canjs.com/release/{{version}}/can.ejs.js'),
'mustache': Handlebars.compile('http://v2.canjs.com/release/{{version}}/can.view.mustache{{systemifv2 version}}.js'),
'stache': Handlebars.compile('http://v2.canjs.com/release/{{version}}/can.stache.js')
};

@@ -14,0 +23,0 @@

{
"name": "can-compile",
"description": "Compile CanJS Mustache and EJS views for lightning fast production apps",
"version": "0.10.2",
"homepage": "http://daffl.github.com/can-compile",
"version": "0.11.0",
"homepage": "http://canjs.github.io/can-compile",
"license": "MIT",

@@ -10,3 +10,3 @@ "author": {

"email": "daff@neyeon.com",
"web": "http://daffl.github.com"
"web": "http://daffl.github.io"
},

@@ -19,3 +19,3 @@ "main": "lib/index.js",

"type": "git",
"url": "git@github.com:daffl/can-compile.git"
"url": "git@github.com:canjs/can-compile.git"
},

@@ -22,0 +22,0 @@ "bin": {

@@ -55,2 +55,3 @@ /*global describe, it */

}
};

@@ -121,2 +122,3 @@

version: version,
out: "test",
wrapper: '!function() { {{{content}}} }();'

@@ -138,2 +140,3 @@ }, function (err, result) {

version: version,
out: "test",
wrapper: '!function() { {{{content}}} }();'

@@ -157,5 +160,6 @@ }, function(err, result) {

it('includes the right plugins', function(){
expect(resolveScripts('1.1.5')).to.contain('http://canjs.com/release/1.1.5/can.view.mustache.js', '1.1.5 includes mustache');
expect(resolveScripts('2.1.3')).to.contain('http://canjs.com/release/2.1.3/can.ejs.js', '2.1.3 includes ejs');
expect(resolveScripts('2.1.3')).to.contain('http://canjs.com/release/2.1.3/can.stache.js', '2.1.3 includes stache');
expect(resolveScripts('1.1.5')).to.contain('http://v2.canjs.com/release/1.1.5/can.view.mustache.js', '1.1.5 includes mustache');
// expect(resolveScripts('2.1.3')).to.contain('http://v2.canjs.com/release/2.1.3/can.view.mustache.system.js', '2.1.3 includes mustache with .system');
expect(resolveScripts('2.1.3')).to.contain('http://v2.canjs.com/release/2.1.3/can.ejs.js', '2.1.3 includes ejs');
expect(resolveScripts('2.1.3')).to.contain('http://v2.canjs.com/release/2.1.3/can.stache.js', '2.1.3 includes stache');
});

@@ -220,3 +224,3 @@ });

gulp.src(__dirname + '/fixtures/view.ejs')
.pipe(gulpCompile('test.js', {version: '2.2.7'}))
.pipe(gulpCompile('test.js', {version: '2.2.7', out: "test.out" }))
.pipe(assert.length(1))

@@ -234,3 +238,3 @@ .pipe(assert.first(function (file) {

gulp.src(__dirname + '/fixtures/*')
.pipe(gulpCompile('test.js', {version: '2.2.7'}))
.pipe(gulpCompile('test.js', {version: '2.2.7', out: "test.out" }))
.pipe(assert.length(1))

@@ -253,3 +257,3 @@ .pipe(assert.first(function (file) {

it('should register a gulp task', function () {
gulpCompile.task('cancompile', {}, gulp);
gulpCompile.task('cancompile', { out: "test.out" }, gulp);
expect(Object.keys(gulp.tasks)).to.contain('cancompile');

@@ -259,3 +263,3 @@ });

it('should include any dependencies', function () {
gulpCompile.task('cancompile', {}, gulp, ['clean']);
gulpCompile.task('cancompile', { out: "test.out" }, gulp, ['clean']);
expect(gulp.tasks.cancompile.dep).to.contain('clean');

@@ -262,0 +266,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