Open mm765 opened 8 years ago
Thanks. I will fix it in the morning. ;)
On Tuesday, January 5, 2016, mm765 notifications@github.com wrote:
The way it is described in the readme ("git clone git@githubcom:decafjs/decaf") did not work for me, instead i used: "git clone https://githubcom/decafjs/decaf" I don't know if that is just me or if the readme should be changed
Regards, Matthias
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12.
I highly recommend you use bower to install decaf. There's an example app or tutorial repo you might want to review.
On Tuesday, January 5, 2016, Mike Schwartz mykesx@gmail.com wrote:
Thanks. I will fix it in the morning. ;)
On Tuesday, January 5, 2016, mm765 <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
The way it is described in the readme ("git clone git@githubcom:decafjs/decaf") did not work for me, instead i used: "git clone https://githubcom/decafjs/decaf" I don't know if that is just me or if the readme should be changed
Regards, Matthias
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12.
Yeah, i've seen that you use bower but i don't like the added "weight" :)
The advantage of bower is you can be sure your app isn't loading modules from /usr/local, and you basically just do git clone && bower install and you're up and running.
On Tuesday, January 5, 2016, mm765 notifications@github.com wrote:
Yeah, i've seen that you use bower but i don't like the added "weight" :)
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169204111.
Im using Cake (from coffeescript, like "make") to install and update(watch for code-changes) my app, so i have my own directory structure which i want to keep as clean as possible. Which btw, also gave me a small headache regarding the mongo-jar-file. My solution was to add a LOCALCP environment var and add that in the decaf-common.sh directly to the CP="." line - making it CP=".:$LOCALCP". I've seen that, if there is a local modules dir the files from there are added but, again, this does not work with my directory structure
Please read the require() documentation on the wiki. You can set the path array that require() searches to your preferred structure. If it were me, I'd use bower to install some things and cake for the rest. Path of least resistance.
On Tue, Jan 5, 2016 at 6:54 PM, mm765 notifications@github.com wrote:
Im using Cake (from coffeescript, like "make") to install and update(watch for code-changes) my app, so i have my own directory structure which i want to keep as clean as possible. Which btw, also gave me a small headache regarding the mongo-jar-file. My solution was to add a LOCALCP environment var and add that in the decaf-common.sh directly to the CP="." line - making it CP=".:$LOCALCP". I've seen that, if there is a local modules dir the files from there are added but, again, this does not work with my directory structure
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169204731.
I read that - but i thought that it only works for javascipt-modules not for adding .jar files to the classpath ? Maybe i should read it again.
require() doesn't load the .jar files. Those are loaded from ./modules/java/*.jar and a few other possible locations added to the class path. Java is ugly when it comes to CLASSPATH.
On Tue, Jan 5, 2016 at 7:01 PM, mm765 notifications@github.com wrote:
I read that - but i thought that it only works for javascipt-modules not for adding .jar files to the classpath ? Maybe i should read it again.
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169205581.
Ok, thats what i thought - my LOCALCP adds to the java classpath, not js-modules. And yeah, i already hated the classpath 10-15 years or so ago, when i last used java.
decaf.sh debug yourscript.js
in the debugger, choose "break on exceptions" and let your program run
When it stops at the error, you can examine the variables and state of the program.
In the debugger's console panel (lower right), you can enter JS expressions. I implemented a d() method that will dump a JS/Java object in human readable format. That might help diagnose things.
On Tue, Jan 5, 2016 at 7:02 PM, Mike Schwartz mykesx@gmail.com wrote:
require() doesn't load the .jar files. Those are loaded from ./modules/java/*.jar and a few other possible locations added to the class path. Java is ugly when it comes to CLASSPATH.
On Tue, Jan 5, 2016 at 7:01 PM, mm765 notifications@github.com wrote:
I read that - but i thought that it only works for javascipt-modules not for adding .jar files to the classpath ? Maybe i should read it again.
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169205581.
That is very good to know (need to bookmark this :) )
If you come up with any pull requests, they are welcome.
On Tue, Jan 5, 2016 at 7:12 PM, mm765 notifications@github.com wrote:
That is very good to know (need to bookmark this :) )
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169206903.
This site is done with decaf and mongodb:
It has a basic CMS with modules for events and news. The pages are rendered using HoganJS. It does e-commerce and sends email, syncs with mailchimp for sending newsletters.
The home page is rendering maybe 10 hogan templates and does a handful of mongo queries. I see page load times (with empty browser cache) something like this:
527ms seems fast to me :)
I wish I could open the source to the public, but it's not my call.
The directory structure is something like:
./ ./boot.js ./controllers/ ./lib/ ./views/ ./services/
controllers are Jolt endpoints.
lib/ contains local modules and data models
views/ contains hoganjs templates and partials
services/ contains Jolt endpoints for Ajax/XHR requests from the client. That is, API returning JSON.
On Tue, Jan 5, 2016 at 7:13 PM, Mike Schwartz mykesx@gmail.com wrote:
If you come up with any pull requests, they are welcome.
On Tue, Jan 5, 2016 at 7:12 PM, mm765 notifications@github.com wrote:
That is very good to know (need to bookmark this :) )
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169206903.
You can put debugger; statement in your code to stop the app in the debugger.
d(db.find()) works :)
any expression can be dumped.
On Tue, Jan 5, 2016 at 7:20 PM, Mike Schwartz mykesx@gmail.com wrote:
This site is done with decaf and mongodb:
It has a basic CMS with modules for events and news. The pages are rendered using HoganJS. It does e-commerce and sends email, syncs with mailchimp for sending newsletters.
The home page is rendering maybe 10 hogan templates and does a handful of mongo queries. I see page load times (with empty browser cache) something like this:
527ms seems fast to me :)
I wish I could open the source to the public, but it's not my call.
The directory structure is something like:
./ ./boot.js ./controllers/ ./lib/ ./views/ ./services/
controllers are Jolt endpoints.
lib/ contains local modules and data models
views/ contains hoganjs templates and partials
services/ contains Jolt endpoints for Ajax/XHR requests from the client. That is, API returning JSON.
On Tue, Jan 5, 2016 at 7:13 PM, Mike Schwartz mykesx@gmail.com wrote:
If you come up with any pull requests, they are welcome.
On Tue, Jan 5, 2016 at 7:12 PM, mm765 notifications@github.com wrote:
That is very good to know (need to bookmark this :) )
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169206903.
Regarding your first post, the clone URL (for SSH) on the home page, the URL provided by github, is git@github.com:decafjs/decaf.git
It only works if you've logged in and uploaded an ssh key.
one more thing...
https://github.com/decafjs/decaf-coffeescript
If you require('decaf-coffeescript'), then you can require('foo') and it will load and compile foo.coffeescript if it exists.
No need for watchers except for client side coffeescript -> JS.
There is also this:
https://github.com/decafjs/decaf-jolt-coffeescript
It provides a Jolt module that allows you to write your controllers and API endpoints 100% in coffeescript, no watchers.
The version of coffeescript in the repo is probably really old. You can probably drop in a newer version if that's required.
I've seen the coffeescript/jolt-coffeescript projects and really like the idea. But my codebase will be too large for that - i am running a minify on the javascript after coffeescript-compilation.
That's ok. You know your app best.
FWIW, I wrote the http server in 100% coffeescript and for the life of me, I could not get it to go any faster than .6 x the speed of pure JS. That is, my best coffeescript turned out to be 40% slower than my best JS.
On Tue, Jan 5, 2016 at 7:41 PM, mm765 notifications@github.com wrote:
I've seen the coffeescript/jolt-coffeescript projects and really like the idea. But my codebase will be too large for that - i am running a minify on the javascript after coffeescript-compilation.
— Reply to this email directly or view it on GitHub https://github.com/decafjs/decaf/issues/12#issuecomment-169212952.
The way it is described in the readme ("git clone git@github.com:decafjs/decaf") did not work for me, instead i used: "git clone https://github.com/decafjs/decaf" I don't know if that is just me or if the readme should be changed.
Regards, Matthias