Comments (3)
require.define("parts/jewels/chat-message.jade",Function(['require','module','exports','__dirname','__filename','process'],"module.exports = function anonymous(locals, attrs, escape, rethrow, merge) {\nattrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\nvar buf = [];\nwith (locals || {}) {\nvar interp;\nbuf.push('<li><span class=\"thumbnail profile-photo\"><img');\nbuf.push(attrs({ 'src':('/profile/' + (message.senderId) + '/photo') }, {\"src\":true}));\nbuf.push('/></span><div class=\"details\"><div class=\"message\">');\nvar __val__ = message.message\nbuf.push(escape(null == __val__ ? \"\" : __val__));\nbuf.push('</div><span');\nbuf.push(attrs({ 'data-ms':(new Date(message.tsCreated).getTime()), \"class\": ('timestamp') }, {\"data-ms\":true}));\nbuf.push('></span>');\nif ( (message.classifiedId))\n{\nbuf.push('<div class=\"regarding\">Re: <a');\nbuf.push(attrs({ 'href':(\"/classified/\" + (message.classifiedId) + \"\"= message.classifiedTitle) }, {\"href\":true}));\nbuf.push('></a></div>');\n}\nbuf.push('</div></li>');\n}\nreturn buf.join(\"\");\n}\n//@ sourceURL=parts/jewels/chat-message.jade"
));
I found that this is the code that give me this error. Anyone see anything wrong with that? :P
from browserijade.
I figured out that the issue was coming from this line in my Jade file:
a(href="/classified/#{message.classifiedId}"= message.classifiedTitle)
Which is an error. It should have been
a(href="/classified/#{message.classifiedId}")= message.classifiedTitle
Now, this took a lot of time for me to debug because I needed to set a breakpoint on uncaught exceptions and then dig through the line of code through trial an error. It was tedious. There has to be a better way to report syntax errors in my templates. In Express, when you try to access a template that has an error, it gives you a pretty extensive report on the error that is very helpful. Sense this isn't express, it's the browser, is there a way to replicate this good error reporting for the browserijade lib?
I'm not too familiar with how browserijade works, let alone Jade, Express or Browserify. However, I'm getting the hang of it. Let me know how error reporting could be done, or why it could not be possible in browserijade.
from browserijade.
Hey there Sam.
I haven't been able to do much Node.js programming lately, so this might take a little while to fix unless you're able to help me out.
First off, Browserify has a --dev
flag that enables sourceURLs in the bundle. If you enable sourceURLs in Webkit dev tools or Firebug you should get far more debuggable files.
It does seem a little strange that Jade doesn't give you an error on build though. It might just be really hard to catch without running it.
As of right now there is no browser testing which is bad. Testling CI should be hooked up so we can see exactly what browsers the tests are passing in at any time.
from browserijade.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browserijade.