Remove outdated eco package from bench
The `eco`-templates (Embedded CoffeeScript templates) had their last update over 10 years ago, so we can remove this dependency from our benchmark.
This commit is contained in:
committed by
Jay Linski
parent
f73be4ebf3
commit
0896d00c2e
Generated
-62
@@ -29,7 +29,6 @@
|
||||
"concurrently": "^5.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"dustjs-linkedin": "^2.0.2",
|
||||
"eco": "~1.1.0-rc-3",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-config-prettier": "^6.7.0",
|
||||
"eslint-plugin-compat": "^3.13.0",
|
||||
@@ -3517,20 +3516,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/coffee-script": {
|
||||
"version": "1.12.7",
|
||||
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
|
||||
"integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
|
||||
"deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"cake": "bin/cake",
|
||||
"coffee": "bin/coffee"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/collection-visit": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
|
||||
@@ -4731,22 +4716,6 @@
|
||||
"safer-buffer": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eco": {
|
||||
"version": "1.1.0-rc-3",
|
||||
"resolved": "https://registry.npmjs.org/eco/-/eco-1.1.0-rc-3.tgz",
|
||||
"integrity": "sha1-dCoyxGFa9wWrPppGts5cFtvFcmI=",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"coffee-script": ">=1.2.0",
|
||||
"strscan": ">=1.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"eco": "bin/eco"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
@@ -14886,15 +14855,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strscan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strscan/-/strscan-1.0.1.tgz",
|
||||
"integrity": "sha1-Ry2bwAxo6QbvL8Is33Yr58YazE0=",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
@@ -19077,12 +19037,6 @@
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"dev": true
|
||||
},
|
||||
"coffee-script": {
|
||||
"version": "1.12.7",
|
||||
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
|
||||
"integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
|
||||
"dev": true
|
||||
},
|
||||
"collection-visit": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
|
||||
@@ -20062,16 +20016,6 @@
|
||||
"safer-buffer": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"eco": {
|
||||
"version": "1.1.0-rc-3",
|
||||
"resolved": "https://registry.npmjs.org/eco/-/eco-1.1.0-rc-3.tgz",
|
||||
"integrity": "sha1-dCoyxGFa9wWrPppGts5cFtvFcmI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"coffee-script": ">=1.2.0",
|
||||
"strscan": ">=1.0.1"
|
||||
}
|
||||
},
|
||||
"ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
@@ -28185,12 +28129,6 @@
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"dev": true
|
||||
},
|
||||
"strscan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strscan/-/strscan-1.0.1.tgz",
|
||||
"integrity": "sha1-Ry2bwAxo6QbvL8Is33Yr58YazE0=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
"concurrently": "^5.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"dustjs-linkedin": "^2.0.2",
|
||||
"eco": "~1.1.0-rc-3",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-config-prettier": "^6.7.0",
|
||||
"eslint-plugin-compat": "^3.13.0",
|
||||
|
||||
@@ -9,6 +9,5 @@ module.exports = {
|
||||
},
|
||||
handlebars: '{{#each names}}{{name}}{{/each}}',
|
||||
dust: '{#names}{name}{/names}',
|
||||
mustache: '{{#names}}{{name}}{{/names}}',
|
||||
eco: '<% for item in @names: %><%= item.name %><% end %>'
|
||||
mustache: '{{#names}}{{name}}{{/names}}'
|
||||
};
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<h1><%= @header() %></h1>
|
||||
<% if @items.length: %>
|
||||
<ul>
|
||||
<% for item in @items: %>
|
||||
<% if item.current: %>
|
||||
<li><strong><%= item.name %></strong></li>
|
||||
<% else: %>
|
||||
<li><a href="<%= item.url %>"><%= item.name %></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else: %>
|
||||
<p>The list is empty.</p>
|
||||
<% end %>
|
||||
@@ -15,6 +15,5 @@ module.exports = {
|
||||
|
||||
handlebars: fs.readFileSync(__dirname + '/complex.handlebars').toString(),
|
||||
dust: fs.readFileSync(__dirname + '/complex.dust').toString(),
|
||||
eco: fs.readFileSync(__dirname + '/complex.eco').toString(),
|
||||
mustache: fs.readFileSync(__dirname + '/complex.mustache').toString()
|
||||
};
|
||||
|
||||
@@ -9,6 +9,5 @@ module.exports = {
|
||||
foo: 'bar'
|
||||
},
|
||||
handlebars: '{{#each names}}{{../foo}}{{/each}}',
|
||||
mustache: '{{#names}}{{foo}}{{/names}}',
|
||||
eco: '<% for item in @names: %><%= @foo %><% end %>'
|
||||
mustache: '{{#names}}{{foo}}{{/names}}'
|
||||
};
|
||||
|
||||
@@ -10,7 +10,5 @@ module.exports = {
|
||||
},
|
||||
handlebars:
|
||||
'{{#each names}}{{#each name}}{{../bat}}{{../../foo}}{{/each}}{{/each}}',
|
||||
mustache: '{{#names}}{{#name}}{{bat}}{{foo}}{{/name}}{{/names}}',
|
||||
eco:
|
||||
'<% for item in @names: %><% for child in item.name: %><%= item.bat %><%= @foo %><% end %><% end %>'
|
||||
mustache: '{{#names}}{{#name}}{{bat}}{{foo}}{{/name}}{{/names}}'
|
||||
};
|
||||
|
||||
@@ -2,6 +2,5 @@ module.exports = {
|
||||
context: { person: { name: 'Larry', age: 45 } },
|
||||
handlebars: '{{#with person}}{{name}}{{age}}{{/with}}',
|
||||
dust: '{#person}{name}{age}{/person}',
|
||||
eco: '<%= @person.name %><%= @person.age %>',
|
||||
mustache: '{{#person}}{{name}}{{age}}{{/person}}'
|
||||
};
|
||||
|
||||
@@ -3,7 +3,5 @@ module.exports = {
|
||||
handlebars:
|
||||
'{{person.name.bar.baz}}{{person.age}}{{person.foo}}{{animal.age}}',
|
||||
dust: '{person.name.bar.baz}{person.age}{person.foo}{animal.age}',
|
||||
eco:
|
||||
'<%= @person.name.bar.baz %><%= @person.age %><%= @person.foo %><% if @animal: %><%= @animal.age %><% end %>',
|
||||
mustache: '{{person.name.bar.baz}}{{person.age}}{{person.foo}}{{animal.age}}'
|
||||
};
|
||||
|
||||
@@ -2,6 +2,5 @@ module.exports = {
|
||||
context: {},
|
||||
handlebars: 'Hello world',
|
||||
dust: 'Hello world',
|
||||
mustache: 'Hello world',
|
||||
eco: 'Hello world'
|
||||
mustache: 'Hello world'
|
||||
};
|
||||
|
||||
@@ -7,8 +7,7 @@ module.exports = {
|
||||
return 'Colors';
|
||||
}
|
||||
},
|
||||
handlebars: '{{echo (header)}}',
|
||||
eco: '<%= @echo(@header()) %>'
|
||||
handlebars: '{{echo (header)}}'
|
||||
};
|
||||
|
||||
module.exports.context = module.exports.helpers;
|
||||
|
||||
@@ -2,6 +2,5 @@ module.exports = {
|
||||
context: { name: 'Mick', count: 30 },
|
||||
handlebars: 'Hello {{name}}! You have {{count}} new messages.',
|
||||
dust: 'Hello {name}! You have {count} new messages.',
|
||||
mustache: 'Hello {{name}}! You have {{count}} new messages.',
|
||||
eco: 'Hello <%= @name %>! You have <%= @count %> new messages.'
|
||||
mustache: 'Hello {{name}}! You have {{count}} new messages.'
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
var _ = require('underscore'),
|
||||
runner = require('./util/template-runner'),
|
||||
eco,
|
||||
dust,
|
||||
Handlebars,
|
||||
Mustache;
|
||||
@@ -17,12 +16,6 @@ try {
|
||||
/* NOP */
|
||||
}
|
||||
|
||||
try {
|
||||
eco = require('eco');
|
||||
} catch (err) {
|
||||
/* NOP */
|
||||
}
|
||||
|
||||
function error() {
|
||||
throw new Error('EWOT');
|
||||
}
|
||||
@@ -35,7 +28,6 @@ function makeSuite(bench, name, template, handlebarsOnly) {
|
||||
handlebarsOut,
|
||||
compatOut,
|
||||
dustOut,
|
||||
ecoOut,
|
||||
mustacheOut;
|
||||
|
||||
var handlebar = Handlebars.compile(template.handlebars, { data: false }),
|
||||
@@ -85,20 +77,6 @@ function makeSuite(bench, name, template, handlebarsOnly) {
|
||||
}
|
||||
}
|
||||
|
||||
if (eco) {
|
||||
if (template.eco) {
|
||||
var ecoTemplate = eco.compile(template.eco);
|
||||
|
||||
ecoOut = ecoTemplate(context);
|
||||
|
||||
bench('eco', function() {
|
||||
ecoTemplate(context);
|
||||
});
|
||||
} else {
|
||||
bench('eco', error);
|
||||
}
|
||||
}
|
||||
|
||||
if (Mustache) {
|
||||
var mustacheSource = template.mustache,
|
||||
mustachePartials = partials && partials.mustache;
|
||||
@@ -139,12 +117,11 @@ function makeSuite(bench, name, template, handlebarsOnly) {
|
||||
|
||||
compare(compatOut, 'compat');
|
||||
compare(dustOut, 'dust');
|
||||
compare(ecoOut, 'eco');
|
||||
compare(mustacheOut, 'mustache');
|
||||
}
|
||||
|
||||
module.exports = function(grunt, callback) {
|
||||
// Deferring load incase we are being run inline with the grunt build
|
||||
// Deferring load in case we are being run inline with the grunt build
|
||||
Handlebars = require('../../lib');
|
||||
|
||||
console.log('Execution Throughput');
|
||||
|
||||
Reference in New Issue
Block a user