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

grunt-emberify

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-emberify - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

6

package.json
{
"name": "grunt-emberify",
"description": "Precompile handlebars templates and concatenate all Ember files.",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "https://github.com/gyllstromk/grunt-emberify",

@@ -24,3 +24,5 @@ "author": {

"main": "grunt.js",
"bin": "bin/grunt-emberify",
"bin": {
"grunt-emberify": "bin/grunt-emberify"
},
"engines": {

@@ -27,0 +29,0 @@ "node": "*"

@@ -15,6 +15,6 @@ /*

grunt.registerMultiTask('handlebars', 'Precompile Handlebars templates', function() {
function render(self, compiler, templateFormat) {
var templates = {};
grunt.file.expandFiles(this.file.src).forEach(function(each) {
grunt.file.expandFiles(self.file.src).forEach(function(each) {
var templateName = path.basename(each, path.extname(each));

@@ -26,16 +26,26 @@ if (templateName in templates) {

templates[templateName] =
Handlebars.precompile(grunt.file.read(each)).toString();
templates[templateName] = compiler(grunt.file.read(each).toString());
});
grunt.file.write(this.target, grunt.utils._.keys(templates).map(function(templateName) {
grunt.file.write(self.target, grunt.utils._.keys(templates).map(function(templateName) {
// grunt underscore library is old. should use `pairs`
return util.format('Ember.TEMPLATES[\'%s\'] = ' +
'Ember.Handlebars.template(%s);', templateName,
templates[templateName]);
templateFormat, templateName, templates[templateName]);
}).join('\n'));
this.async()();
self.async()();
}
grunt.registerMultiTask('handlebars_embed', 'Precompile Handlebars templates', function() {
render(this, function(each) {
return each.replace(/"/g, '\\"').replace(/\n/g, ' ');
}, 'Ember.Handlebars.compile("%s");');
});
grunt.registerMultiTask('handlebars_precompile', 'Embed Handlebars templates', function() {
render(this, function(each) {
return Handlebars.precompile(each);
}, 'Ember.Handlebars.template(%s);');
});
};
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