-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plan to support nodejs? #37
Comments
Xiao Hanyu [email protected] writes:
It's been a sort of vague plan that I haven't taken any action on yet |
I'm not sure what you meant by this. I've been noodling around with my fork of skewer-mode, and I see that beyond having different GET/POST methods, there's also the matter of node.js not having a DOM, and so the CSS and HTML "extensions" don't make any sense (nor do I want to shoe-horn it in by using something like jsdom). Also, the current method for loading a whole file via a script element also doesn't make sense. Lastly, my most recent discovery is that node.js's __dirname/__filename are only defined in some "script mode" I don't understand quite yet. I think the current issues are easy enough to deal with - the clients can ignore request types it doesn't understand and file loading can be done in any number of other ways. I've got ideas for the magic script vars, but nothing definitive yet. The bigger problem for me is how my use case is clearly going to be different than the current one(s). Frankly, it took me a while to even imagine why one would want to broadcast every evaluation request to multiple clients: I assume one is to work on a single project at a time with the desire to do interactive cross-browser development. I'd like to do both server and client side development in Javascript - thus, broadcasting every request to all clients is going to be a problem. Going about making the changes for my use case is straightforward; ensuring those changes are acceptable is less so. There are any number of ways to associate Emacs buffers with clients. Has there been any work/thought that I should take into consideration as I go forward? |
@itegebo These are good points.
Ok, so right now a client is represented by a skewer-client defstruct. The most basic method would accept a string containing JavaScript and it
Yup, I would imagine an entirely separate skewer.js script would be
Two reasons:
Good point. Perhaps there needs to be some interface to associate
The biggest issue with making changes right now is the difficulty in
Otherwise I guess I'd say to keep the nodejs-specific functions apart |
Wow, I had not thought about those cases. Very cool.
I was curious, so I went looking. Did you know about ert-async? It's all of 12 days old, so perhaps not...maybe that's an option now.
I wonder about integrating Emacs testing with some combination of PhantomJS
The immediate problem with this approach is the event-related code at the |
I am also interested in this enhancement. Given a project with package.json, I would like to be able to use skewer-mode to use Node.js as backend for development and testing. |
Not super deep on spacemacs configuration and development... more interested in the minimalist approach to getting nodejs repl to run my buffers. I really don't even need skewer for a lot of the backend work. So, I tried different approaches to getting this https://marmalade-repo.org/packages/nodejs-repl emacs feature to work in spacemacs and the misery ran from trying the most evil thing of having require in the user-config function. Rejected at the gate. To trying to just curl the elisp file above into a similarly named directory and referencing nodejs-repl from the So, without further hack and guess, what is the most minimal way to get a package in place to simply allow me to run buffers under the node repl - not caring about pushing to Thanks for any pointers as I am emacs-ignorant and a spacemacs consumer at the beginner level. |
Recent days, nodejs becomes more and more popular. And one of the major advantages of swank-js is that swank-js support nodejs natively.
So I wonder is there any future plan to support nodejs as a js backend in skewer-mode?
The text was updated successfully, but these errors were encountered: