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",
|
"concurrently": "^5.0.0",
|
||||||
"dirty-chai": "^2.0.1",
|
"dirty-chai": "^2.0.1",
|
||||||
"dustjs-linkedin": "^2.0.2",
|
"dustjs-linkedin": "^2.0.2",
|
||||||
"eco": "~1.1.0-rc-3",
|
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
"eslint-config-prettier": "^6.7.0",
|
"eslint-config-prettier": "^6.7.0",
|
||||||
"eslint-plugin-compat": "^3.13.0",
|
"eslint-plugin-compat": "^3.13.0",
|
||||||
@@ -3517,20 +3516,6 @@
|
|||||||
"node": ">=0.10.0"
|
"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": {
|
"node_modules/collection-visit": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
|
||||||
@@ -4731,22 +4716,6 @@
|
|||||||
"safer-buffer": "^2.1.0"
|
"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": {
|
"node_modules/ee-first": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
@@ -14886,15 +14855,6 @@
|
|||||||
"node": ">=0.10.0"
|
"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": {
|
"node_modules/supports-color": {
|
||||||
"version": "5.5.0",
|
"version": "5.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
@@ -19077,12 +19037,6 @@
|
|||||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||||
"dev": true
|
"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": {
|
"collection-visit": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
|
||||||
@@ -20062,16 +20016,6 @@
|
|||||||
"safer-buffer": "^2.1.0"
|
"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": {
|
"ee-first": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
@@ -28185,12 +28129,6 @@
|
|||||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||||
"dev": true
|
"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": {
|
"supports-color": {
|
||||||
"version": "5.5.0",
|
"version": "5.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
"concurrently": "^5.0.0",
|
"concurrently": "^5.0.0",
|
||||||
"dirty-chai": "^2.0.1",
|
"dirty-chai": "^2.0.1",
|
||||||
"dustjs-linkedin": "^2.0.2",
|
"dustjs-linkedin": "^2.0.2",
|
||||||
"eco": "~1.1.0-rc-3",
|
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
"eslint-config-prettier": "^6.7.0",
|
"eslint-config-prettier": "^6.7.0",
|
||||||
"eslint-plugin-compat": "^3.13.0",
|
"eslint-plugin-compat": "^3.13.0",
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
handlebars: '{{#each names}}{{name}}{{/each}}',
|
handlebars: '{{#each names}}{{name}}{{/each}}',
|
||||||
dust: '{#names}{name}{/names}',
|
dust: '{#names}{name}{/names}',
|
||||||
mustache: '{{#names}}{{name}}{{/names}}',
|
mustache: '{{#names}}{{name}}{{/names}}'
|
||||||
eco: '<% for item in @names: %><%= item.name %><% end %>'
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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(),
|
handlebars: fs.readFileSync(__dirname + '/complex.handlebars').toString(),
|
||||||
dust: fs.readFileSync(__dirname + '/complex.dust').toString(),
|
dust: fs.readFileSync(__dirname + '/complex.dust').toString(),
|
||||||
eco: fs.readFileSync(__dirname + '/complex.eco').toString(),
|
|
||||||
mustache: fs.readFileSync(__dirname + '/complex.mustache').toString()
|
mustache: fs.readFileSync(__dirname + '/complex.mustache').toString()
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ module.exports = {
|
|||||||
foo: 'bar'
|
foo: 'bar'
|
||||||
},
|
},
|
||||||
handlebars: '{{#each names}}{{../foo}}{{/each}}',
|
handlebars: '{{#each names}}{{../foo}}{{/each}}',
|
||||||
mustache: '{{#names}}{{foo}}{{/names}}',
|
mustache: '{{#names}}{{foo}}{{/names}}'
|
||||||
eco: '<% for item in @names: %><%= @foo %><% end %>'
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,5 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
handlebars:
|
handlebars:
|
||||||
'{{#each names}}{{#each name}}{{../bat}}{{../../foo}}{{/each}}{{/each}}',
|
'{{#each names}}{{#each name}}{{../bat}}{{../../foo}}{{/each}}{{/each}}',
|
||||||
mustache: '{{#names}}{{#name}}{{bat}}{{foo}}{{/name}}{{/names}}',
|
mustache: '{{#names}}{{#name}}{{bat}}{{foo}}{{/name}}{{/names}}'
|
||||||
eco:
|
|
||||||
'<% for item in @names: %><% for child in item.name: %><%= item.bat %><%= @foo %><% end %><% end %>'
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ module.exports = {
|
|||||||
context: { person: { name: 'Larry', age: 45 } },
|
context: { person: { name: 'Larry', age: 45 } },
|
||||||
handlebars: '{{#with person}}{{name}}{{age}}{{/with}}',
|
handlebars: '{{#with person}}{{name}}{{age}}{{/with}}',
|
||||||
dust: '{#person}{name}{age}{/person}',
|
dust: '{#person}{name}{age}{/person}',
|
||||||
eco: '<%= @person.name %><%= @person.age %>',
|
|
||||||
mustache: '{{#person}}{{name}}{{age}}{{/person}}'
|
mustache: '{{#person}}{{name}}{{age}}{{/person}}'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,5 @@ module.exports = {
|
|||||||
handlebars:
|
handlebars:
|
||||||
'{{person.name.bar.baz}}{{person.age}}{{person.foo}}{{animal.age}}',
|
'{{person.name.bar.baz}}{{person.age}}{{person.foo}}{{animal.age}}',
|
||||||
dust: '{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}}'
|
mustache: '{{person.name.bar.baz}}{{person.age}}{{person.foo}}{{animal.age}}'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ module.exports = {
|
|||||||
context: {},
|
context: {},
|
||||||
handlebars: 'Hello world',
|
handlebars: 'Hello world',
|
||||||
dust: 'Hello world',
|
dust: 'Hello world',
|
||||||
mustache: 'Hello world',
|
mustache: 'Hello world'
|
||||||
eco: 'Hello world'
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ module.exports = {
|
|||||||
return 'Colors';
|
return 'Colors';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlebars: '{{echo (header)}}',
|
handlebars: '{{echo (header)}}'
|
||||||
eco: '<%= @echo(@header()) %>'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.context = module.exports.helpers;
|
module.exports.context = module.exports.helpers;
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ module.exports = {
|
|||||||
context: { name: 'Mick', count: 30 },
|
context: { name: 'Mick', count: 30 },
|
||||||
handlebars: 'Hello {{name}}! You have {{count}} new messages.',
|
handlebars: 'Hello {{name}}! You have {{count}} new messages.',
|
||||||
dust: 'Hello {name}! You have {count} new messages.',
|
dust: 'Hello {name}! You have {count} new messages.',
|
||||||
mustache: 'Hello {{name}}! You have {{count}} new messages.',
|
mustache: 'Hello {{name}}! You have {{count}} new messages.'
|
||||||
eco: 'Hello <%= @name %>! You have <%= @count %> new messages.'
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
var _ = require('underscore'),
|
var _ = require('underscore'),
|
||||||
runner = require('./util/template-runner'),
|
runner = require('./util/template-runner'),
|
||||||
eco,
|
|
||||||
dust,
|
dust,
|
||||||
Handlebars,
|
Handlebars,
|
||||||
Mustache;
|
Mustache;
|
||||||
@@ -17,12 +16,6 @@ try {
|
|||||||
/* NOP */
|
/* NOP */
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
eco = require('eco');
|
|
||||||
} catch (err) {
|
|
||||||
/* NOP */
|
|
||||||
}
|
|
||||||
|
|
||||||
function error() {
|
function error() {
|
||||||
throw new Error('EWOT');
|
throw new Error('EWOT');
|
||||||
}
|
}
|
||||||
@@ -35,7 +28,6 @@ function makeSuite(bench, name, template, handlebarsOnly) {
|
|||||||
handlebarsOut,
|
handlebarsOut,
|
||||||
compatOut,
|
compatOut,
|
||||||
dustOut,
|
dustOut,
|
||||||
ecoOut,
|
|
||||||
mustacheOut;
|
mustacheOut;
|
||||||
|
|
||||||
var handlebar = Handlebars.compile(template.handlebars, { data: false }),
|
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) {
|
if (Mustache) {
|
||||||
var mustacheSource = template.mustache,
|
var mustacheSource = template.mustache,
|
||||||
mustachePartials = partials && partials.mustache;
|
mustachePartials = partials && partials.mustache;
|
||||||
@@ -139,12 +117,11 @@ function makeSuite(bench, name, template, handlebarsOnly) {
|
|||||||
|
|
||||||
compare(compatOut, 'compat');
|
compare(compatOut, 'compat');
|
||||||
compare(dustOut, 'dust');
|
compare(dustOut, 'dust');
|
||||||
compare(ecoOut, 'eco');
|
|
||||||
compare(mustacheOut, 'mustache');
|
compare(mustacheOut, 'mustache');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(grunt, callback) {
|
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');
|
Handlebars = require('../../lib');
|
||||||
|
|
||||||
console.log('Execution Throughput');
|
console.log('Execution Throughput');
|
||||||
|
|||||||
Reference in New Issue
Block a user