Giter VIP home page Giter VIP logo

browserijade's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

browserijade's Issues

mysterious empty runtime problem

I'm seeing a problem where require('jade/runtime') returns an empty object. This causes an 'undefined not a function' error when the runtime is used. I have a working fix at loku/browserijade@c1b6fa0, but I don't really understand what's going on here.

I stepped through it some, and it seems like require('jade/runtime') tries to require '/node_modules/jade/lib/runtime.js'. I don't know why this would return an empty object, though.

Does it work for you? What version of browserify are you using? I'm on 1.10.11 now.

Note I had to do the runtimePath trickery to get browserify not to die before the browserijade middleware even runs, since at that time 'jade-runtime' is not available.

Misleading example

In the readme, an example says :

bundle.use(browserijade(__dirname + "/views"), ['serverThing.jade'], {debug: true})

I think it should say :

bundle.use(browserijade(__dirname + "/views", ['serverThing.jade'], {debug: true}))

Global locals

In Express you can define global locals using app.locals. Jade templates that run on Express on the server-side that use these globally defined locals work just fine. However, they do not work on the client-side; I just get error messages saying that the locals are not defined. Is there a way to get app.locals to work on the client-side, or is there a way to define a separate set of locals for browserijade?

bug: duplicated content for two elements because of the same class

if pin.blog
    .blog
        section
            a(href='/blog/#{pin.blog.blogId}')
                h1= pin.blog.title
                .body!= pin.blog.excerpt

if (pin.bodyHTML)
    .body!= pin.bodyHTML

both of the .body elements get the same content which is pin.bodyHTML + pin.blog.excerpt. This is an error. If I change one of the element's class name, to say, .blog-body, then each element has different content as it should.

What's going on here? Is this browserijade's fault/error?

npm package and git repo are out of sync

E.g. src/browser.coffee and src/server.coffee are missing. I will be forking to fix #2, and to provide partial support in the client.

In the meantime I will just commit this stuff in my fork.

Also, the packaged version of src/middleware.coffee contains a hardcoded path /home/vagrant/edmellum/lib/shared, while this is missing from lib/middleware.js. I would suggest removing the compiled js files from version control (and gitignoring them).

runtime.js must already be cached

If lib/runtime.js is not included in the package, browserify will die with an error before there is an opportunity to cacheRuntime.

So it seems that cacheRuntime is pointless in the middleware and should be moved to the build?

How well tested is this lib in browsers?

I seem to be running into a Safari exception with my project. I'm having trouble pin-pointing exactly where the exception is coming from, but it appears to be in my browserify bundle and specifically a browserijade template. I'm wondering if it could possibly be something wrong in my jade template or in browserijade itself (it's hard to tell because jade templates are literally compiled down to one line of code, so it's beyond me as to how to debug this issue).

If it were my jade template, then I would see this exception not exclusively in Safari. The exception, specifically, is SyntaxError: Expected token ')'.

Maybe there's a way to turn on a debugging mode for browserijade, so that the templates aren't compiled down to one line of code. This would give me better debugging information for the exception.

However, the question remains, how much testing has been put into this library? What browsers and versions have been tested?

Subfolders in Views crashes

Error: Cannot find module "[...]/views/partials" from directory "[...]/views"
at Function. ([...]/node_modules/browserify/lib/wrap.js:379:19)

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.