Comparing version 0.1.1 to 0.1.2
@@ -54,5 +54,5 @@ module.exports = function(grunt) { | ||
basePathTest: { | ||
basePathStringTest: { | ||
src: ['tests/fixtures/**/*.eco'], | ||
dest: 'tmp/basePathTest/all.js', | ||
dest: 'tmp/basePathStringTest/all.js', | ||
options: { | ||
@@ -63,2 +63,12 @@ basePath: 'tests/fixtures' | ||
basePathFunctionTest: { | ||
src: ['tests/fixtures/**/*.eco'], | ||
dest: 'tmp/basePathFunctionTest/all.js', | ||
options: { | ||
basePath: function(jstPath){ | ||
return jstPath.replace(/(^tests\/fixtures\/|-example$)/g, ''); | ||
} | ||
} | ||
}, | ||
amdTest: { | ||
@@ -65,0 +75,0 @@ options: { |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"licenses": [ | ||
@@ -10,0 +10,0 @@ { |
@@ -132,2 +132,3 @@ # grunt-eco | ||
* `Jun 20, 2014 v0.1.2` - Bubble up task failure | ||
* `Jun 16, 2013 v0.1.0` - Refactoring, tests, AMD support | ||
@@ -134,0 +135,0 @@ * `Mar 04, 2013 v0.0.2` - Grunt 0.4 compatibility |
@@ -21,4 +21,8 @@ /* | ||
if (options.basePath) { | ||
var re = new RegExp(options.basePath + '\/?'); // match basePath + optional path separator | ||
JSTpath = JSTpath.replace(re, ''); | ||
if(typeof(options.basePath) === 'string') { | ||
var re = new RegExp(options.basePath + '\/?'); // match basePath + optional path separator | ||
JSTpath = JSTpath.replace(re, ''); | ||
} if(typeof(options.basePath) === 'function') { | ||
JSTpath = options.basePath(JSTpath); | ||
} | ||
} | ||
@@ -38,2 +42,3 @@ | ||
grunt.log.error("Error in " + src + ":\n" + e); | ||
grunt.fail.warn("Eco failed to compile " + src + "."); | ||
return false; | ||
@@ -85,2 +90,4 @@ } | ||
compiled.push(res); | ||
} else { | ||
grunt.fail.warn('eco failed to compile.'); | ||
} | ||
@@ -87,0 +94,0 @@ }); |
@@ -82,3 +82,3 @@ var grunt = require('grunt'), | ||
basePathTest: function(test) { | ||
basePathStringTest: function(test) { | ||
'use strict'; | ||
@@ -89,4 +89,4 @@ | ||
assertFileEquality(test, | ||
'tmp/basePathTest/all.js', | ||
'tests/expected/basePathTest/all.js', | ||
'tmp/basePathStringTest/all.js', | ||
'tests/expected/basePathStringTest/all.js', | ||
'Should compile all templates into one file'); | ||
@@ -97,3 +97,16 @@ | ||
basePathFunctionTest: function(test) { | ||
'use strict'; | ||
test.expect(1); | ||
assertFileEquality(test, | ||
'tmp/basePathFunctionTest/all.js', | ||
'tests/expected/basePathFunctionTest/all.js', | ||
'Should compile all templates into one file'); | ||
test.done(); | ||
}, | ||
amdTest: function(test) { | ||
@@ -100,0 +113,0 @@ 'use strict'; |
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
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
47243
23
1393
141
1