can-compile
Advanced tools
Comparing version 0.10.2 to 0.11.0
@@ -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) { |
@@ -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 @@ }); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
5
8
896649
34
17441