![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Backbone.Marionette.Handlebars
Advanced tools
Spice up your Backbone.Marionette application with some Handlebars flavour
Spice up your Backbone.Marionette application with some handlebars flavour
This is a tiny library which overrides some of backbone.marionettes internal template functions to make it compatible with handlebars templates.
This especially is very usefull if your using the amd version of marionette and Alex Sextons genius strike, the require-handlebars-plugin. If you don´t know any of this projects listed above, I highly recommend to check them out.
Currently i´ve only tested this within an requirejs based amd ecosystem, but it should also be working within a commonjs or vanilla js based project. See the usage section for more details.
If you need support for Backbone.Marionette versions lower then 0.9.x, please grab the plugin version that´s been tagged with v0.1.0 or download the 0.1.0 zip archive from the downloads section.
Currently the plugin does not support loading templates via XHR requests on its own. Didn´t needed this by now, but support will be added in the future.
Same for selector based template retrival like marionette does for templates, hold on, i will cover this in the future.
Also, writing unit tests (like i always do for my projects, and so should you ;)) is smth. i would like to add as soon as possible. With tests, there will be also an Travis CI integration.
Project Page
Docs
NPM registry
You can download the raw source code from the "src" folder above, or grab one of the builds from the root directory.
To get the latest stable release, use these links which point to the 'master' branch's builds:
Development: backbone.marionette.handlebars.js Production: backbone.marionette.handlebars.min.js
$ volo add Backbone.Marionette.Handlebars
$ npm install Backbone.Marionette.Handlebars
Note: This plugin is UMD compatible, you can use it in node, amd and vanilla js envs (hopefully, not tested, see the section below for more information)
<script src="underscore.js"></script>
<script src="backbone.js"></script>
<script src="handlebars.js"></script>
<script src="backbone.marionette.js"></script>
<script src="backbone.marionette.handlebars.js"></script>
var _ = require('underscore');
var Backbone = require('backbone');
var Marionette = require('backbone.marionette');
var MarionetteHandlebars = require('backbone.marionette.handlebars');
define(['underscore', 'backbone', 'backbone.marionette', 'backbone.marionette.handlebars'], function (_, Backbone, Marionette, MarionetteHandlebars) {
});
A simple example how to a handlebars template to your marionette view:
define([
'jquery',
'underscore',
'backbone',
'backbone.marionette',
'backbone/backbone.marionette.handlebars',
'hbs!Template/category',
],
function ($, _, Backbone, Marionette, MarionetteHandlebars, categoryTpl) {
return Backbone.Marionette.ItemView.extend({
template: {
type: 'handlebars',
template: categoryTpl
}
});
});
Please be aware of that the backbone.marionette.js file should be aliased as 'backbone.marionette' in the paths config for your require ecosystem. (Backbone.Marionette.Handlebars expects it to be referenced like this, when it requires it as a dependency)
A simple example how to a handlebars template to your marionette view, when not using an amd loader:
!Warning: This is not tesed, writing some unit tests to cover this use case is on my list ;)
var tmpl =
var MyView = Backbone.Marionette.ItemView.extend({
template: {
type: 'handlebars',
template: Handlebars.compile(tmpl)
}
});
Please be aware of that the backbone.marionette.js file should be aliased as 'backbone.marionette' in the paths config for your require ecosystem. (Backbone.Marionette.Handlebars expects it to be referenced like this, when it requires it as a dependency)
If you're interested in helping with code and questions, please see the issues list and stack overflow tag here, you can also reach me on twitter:
If you have an idea to improve Backbone.Chosen or want to report a bug, please use the issues list.
Theses libraries are required for the use, development, testing and documentation of Backbone.Marionette.Handlebars.
Backbone.Marionette.Handlebars currently works with the following versions of these libraries:
Backbone.Marionette.Handlebars has not been tested against any other versions of these libraries. You may or may not have success if you use a version other than what it listed here.
I use a number of tools to build, test and maintain Backbone.Marionette.Handlebars, including but not limited to:
The Grunt project is used to generate the builds for Backbone.Marionette.Handlebars.
I'm using Docco to generate the annotated source code together with the great DocMaps service.
Copyright (c) 2012 Sebastian Golasch, asciidisco
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Spice up your Backbone.Marionette application with some Handlebars flavour
The npm package Backbone.Marionette.Handlebars receives a total of 0 weekly downloads. As such, Backbone.Marionette.Handlebars popularity was classified as not popular.
We found that Backbone.Marionette.Handlebars demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.