node JS parameters #494
Comments
not right now, but you could be tricky and alias node to |
+1 on this feature. Hoping to develop with app.js using LightTable, would be great if it was possible. I couldn't get your suggested workaround to work. |
I'd like to see that, too. For nodeJS, there could just be a special behaviour that automatically sets the harmony flag! (Also, I think there is enough room for a simple checkbox in the connector panel, however that changes the consistent UI a bit …) |
@ibdknox I've tested aliasing node and running light from shell but it doesn't worked for me i'm using the latest version downloaded from lighttable.com on OS X Lion. |
We don't have the bandwidth to take this on but happy to talk someone through a pull request. Basically, you'll want to provide a means to change these args to node. If people want the same args by default, then a behavior is the way to go. If people want to specify this on every connection, then a dialog like the one for Clojure nREPL is the way to go. |
If this issue is still open I'd be happy to attempt to solve it |
+1, it's a must have IMHO |
I think I've got this working. I've only been running it against a local build of the latest atom-shell branch (on a Mac). To use, add an entry like this to your user.behaviors file:
I used the hello-world example from the Koa example apps: and connected Node.js to the app.js file for that example. I can then access the example at http://localhost:3000 tho I do see the following logged to the console:
The example continues to work even after the above error is logged. |
@zachaller @skeet70 @fbender @eafzali @gavocanov Anyone interested or willing to test my initial attempt? You should be able to clone my fork into the plugin directory and then refresh the plugin list in LT. @frankcash If you're still available and willing to help, I'd appreciate a review of my changes. |
@kenny-evitt I built the latest atom-shell branch, cloned your fork in the plugins directory and it works like a charm, all "harmony" features seems working (let, const, arrow functions etc.). Thanks a lot! |
@kenny-evitt I've verified this works with a few harmony features: "foo".contains("f")
"f".startsWith("f")
var a = [
"Hydrogen",
"Helium",
"Lithium",
"Beryllium"
];
a.map( s => s.length ); Nice work!
|
@kenny-evitt Your branch is close to knocking this out. Want to open a PR for it and address the minor feedback? |
@cldwalker Thanks for the eyes. I created a PR for my changes and I just pushed a rebase of my changes and your suggestions. The console logging was just a quick aid for debugging. I don't remember why I named the behavior the original name. I changed it to your suggestion. I removed |
This is in the latest version of the JavaScript plugin. You should be able to update to that version from within LT. |
is there a way to pass params to a node js connections such as harmony for your project we need harmony support so we normally start node with
node --harmony app.js
The text was updated successfully, but these errors were encountered: