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

grunt-eco

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-eco - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

tests/expected/basePathFunctionTest/all.js

14

Gruntfile.js

@@ -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: {

2

package.json

@@ -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';

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