Giter Club home page Giter Club logo

ember-handlebars-brunch's Introduction

Hi there ๐Ÿ‘‹

I currently head up Enterprise Architecture and Data Engineering at MeridianLink. I previously worked at ACTIVE Network, rewardStyle (now LTK), SoftLayer (now IBM Cloud).

  • ๐Ÿ’ฌ Ask me about Cloud Architecture, API design, JavaScript, Node.js, Python, Go, automating yourself out of a job
  • ๐Ÿ˜„ Pronouns: he/him
  • ๐Ÿ‘ช Father and Husband
  • ๐ŸŽธ Musician
  • ๐Ÿถ Weimaraner and Dachshund Dad
  • ๐Ÿบ Craft beer and coffee snob

ember-handlebars-brunch's People

Contributors

bartsqueezy avatar jonbuffington avatar juggy avatar notmessenger avatar rodchito avatar thejchap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ember-handlebars-brunch's Issues

Destroyed Git history and missing important fixes

Hi, as a contributor of https://github.com/icholy/ember-handlebars-brunch I'm confused to see this repository.

First of all, why is the entire Git history gone? And secondly, there is already a maintained fork https://github.com/stravid/ember-handlebars-brunch and NPM package people use. This repository is also missing some crucial fixes like no module and Windows support.

I'm curious about your intentions and hope we can focus our work so people have one place to go.

Cheers,
David

Publish latest master to npm

Could you publish the latest master to public NPM? I'm eager for the upgraded template compiler. d0ee001 AKA 1.2.1 according to its package.json.

Problem compiling on win32 platform when directory level has more than 2 deep.

For example:

app/
templates/
artifact/
common/
propertyAddress.hbs

Actual result:

window.require.register("templates/artifact/common/propertyAddress", function(exports, require, module) {
Ember.TEMPLATES['artifact/common\propertyAddress'] = ...

Expected Results:

window.require.register("templates/artifact/common/propertyAddress", function(exports, require, module) {
Ember.TEMPLATES['artifact/common/propertyAddress'] = ...

Posible solution:

Updating line 25 of index.coffee to:

tmplPath = tmplPath.replace /\/g, '/'

Regards,

(sorry for my bad english)

Optimizer generates javascript with errors

I have an application using your plugin, and all works fine until I uses the --optimize options while running brunch build.
Other scripts compile correctly while optimizing, I got the ember debug lines in the console, but it's telling me there is an unexpected = in the template.js file:

Uncaught SyntaxError: Unexpected token = templates.js:1
DEBUG: ------------------------------- vendor.js:5
DEBUG: Ember.VERSION : 1.0.0-rc.3 vendor.js:5
DEBUG: Handlebars.VERSION : 1.0.0-rc.3 vendor.js:5
DEBUG: jQuery.VERSION : 1.9.1 vendor.js:5
DEBUG: ------------------------------- vendor.js:5
Uncaught Error: Cannot find module "templates/application"

Here is my config:

    templates:
      precompile: true
      root: 'templates'
      defaultExtension: 'hbs'
      joinTo: 'javascripts/templates.js' : /^app/

And I can see in this javascript, after reformatting it for better reading, where is the unexpected = (in fact there is not only one, but many):

window.require.register("templates/application", function (exports, require, module) {
    Ember.TEMPLATES[= application] = Ember.Handlebars.template(function anonymous(Handlebars, depth0, helpers, partials, data) {
        this.compilerInfo = [2, '>=1.0-rc.3'];
        helpers = helpers || Ember.Handlebars.helpers;
        data = data || {};
        var buffer = '', stack1, hashTypes, helperMissing = helpers.helperMissing, escapeExpression = this.escapeExpression, self = this;

        function program1(depth0, data) {
            var stack1, hashTypes, options;
            hashTypes = {};
            options = {hash:{}, contexts:[depth0], types:[= STRING], hashTypes:hashTypes, data:data};
            data.buffer.push(escapeExpression(((stack1 = helpers.render), stack1 ? stack1.call(depth0, "left-panel", options) : helperMissing.call(depth0, "render", "left-panel", options))))
        }

So as you can see there are problematic = first in Ember.TEMPLATES[= application] (where also application should be surrounded by quotes but isn't), and then in types:[= STRING] (which I can find in any "program" function created).

Feel free to ask for more information(s) to debug if needed.

Update to RC4

Both Ember and Handlebars are now at RC4. Could we get an update for this? I've tried most of the morning to get it to work, but have had no success until now. I'm happy to make it happen if somebody could lend a hand.

Update to handlebars-1.0.0?

Will this updated to handlebars-1.0.0 soon? The latest ember builds are now using the 1.0 release of handlebars and just swapping in the handlebars.js into /node_modules/ember-handlebars-brunch/vendor/handlebars.js apparently doesn't do the trick. Admittedly that may have been a naive hope on my part but that didn't stop me from hoping.

Updating to Ember 1.2 breaks template compiling

The following exception is raised:

Assertion Failed: `blockHelperMissing` was invoked without a helper name, which is most likely due to a mismatch between the version of Ember.js you're running now and the one used to precompile your templates. Please make sure the version of `ember-handlebars-compiler` you're using is up to date.
Error: Assertion Failed: `blockHelperMissing` was invoked without a helper name, which is most likely due to a mismatch between the version of Ember.js you're running now and the one used to precompile your templates. Please make sure the version of `ember-handlebars-compiler` you're using is up to date.

Probably an update to the template compiler is needed.

Having trouble running the test

Hi, thanks for working on this. I'd like to add the ability to compile Jade in the Handlebars templates.

To do this, I plan to add this code, which worked fine for me when done directly in the code:

cd ember-handlebars-brunch/
npm install --save jade
add this to index.js
jade = require('jade');
โ€ฆ
var content, error, result, tmplName, tmplPath, 
...
jadeOutput;
if (this.precompile === true) {
          jadeOutput = jade.compile(data.toString(), {
            compileDebug: true,
            filename: tmplPath
          });

 content = compileHBS(jadeOutput());

In trying to do this, I had trouble running the tests. My steps were

git clone https://github.com/bartsqueezy/ember-handlebars-brunch.git
cd ember-handlebars-brunch/
npm install
npm test

result: "error: cannot find module 'handlebars'"

So I updated test/plugin_test.js to have this:
"var Handlebars = require('../vendor/handlebars');"

Then I get this error:
" 1) plugin "before each" hook:
typeerror: cannot read property 'templates' of undefined
at new emberhandlebarscompiler (/users/s.redlich/documents/testembertoss/ember-handlebars-brunch/lib/index.js:26:28)"

Questions:

  • Am I on the right track or am I just running the the tests incorrectly?
  • Is there a graceful way to add the Jade precompilation step without forking ember-handlebars-brunch? I was hoping that Brunch could do multiple precompilation steps in a series but I don't see a way to do that.

Thanks for any tips,

  • Sanford

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.