@@ -56,35 +56,28 @@ will be eventually added.
56
56
Installation
57
57
------------
58
58
59
- 1 . Install [ Node.JS] ( http://nodejs.org ) , [ npm] ( http://npmjs.org/ ) and
60
- then [ Socket.IO] ( http://socket.io/ ) :
61
-
62
- npm install socket.io
63
- 2 . Get recent [ SLIME] ( http://common-lisp.net/project/slime/ ) from its CVS
64
- or the [ git mirror] ( http://git.boinkor.net/gitweb/slime.git ) . The backend
65
- was verified to work with SLIME 2012-02-12, it may or may not work with
66
- other versions, but note that breaking change in the protocol was introduced
67
- in SLIME 2011-11-27.
68
- 3 . Make sure you have latest [ js2-mode] ( http://code.google.com/p/js2-mode/ ) .
69
- Add it to your .emacs:
70
-
71
- (add-to-list 'load-path "/path/to/js2-mode/directory")
72
- (autoload 'js2-mode "js2-mode" nil t)
73
- (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
74
- 3 . Create symbolic link to slime-js.el in the contrib subdirectory of
75
- SLIME project.
59
+ 1 . Install [ Node.JS] ( http://nodejs.org ) and [ npm] ( http://npmjs.org/ )
60
+ 2 . Install swank-js from npm:
61
+
62
+ npm install -g swank-js
63
+
64
+ 3 . Install [ slime-js] ( https://github.com/Gozala/slime-js ) into emacs from
65
+ http://marmalade-repo.org
66
+
67
+ M-x package-install slime-js
68
+
69
+ 3 . Install [ js2-mode] ( http://code.google.com/p/js2-mode/ ) into emacs from
70
+ http://tromey.com/elpa/
71
+
76
72
4 . In your .emacs, add the following lines (you may use other key for
77
73
slime-js-reload; also, if you're already using SLIME, just add slime-js
78
74
to the list of contribs, otherwise adjust the load-path item):
79
75
80
- (add-to-list 'load-path "/path/to/slime/installation")
81
- (require 'slime)
82
- (slime-setup '(slime-repl slime-js))
83
-
84
76
(global-set-key [f5] 'slime-js-reload)
85
77
(add-hook 'js2-mode-hook
86
78
(lambda ()
87
79
(slime-js-minor-mode 1)))
80
+
88
81
5 . If you're using CSS mode, you may want to add the following lines too:
89
82
90
83
(add-hook 'css-mode-hook
@@ -95,13 +88,32 @@ to the list of contribs, otherwise adjust the load-path item):
95
88
Usage
96
89
-----
97
90
98
- Start swank-js with the following command in the project directory:
91
+ If you want to use swank from the node project just add following to your
92
+ package.json file:
93
+
94
+ "devDependencies": {
95
+ "swank-js": ">=0.0.1"
96
+ },
97
+ "scripts": {
98
+ "swank": "node node_modules/swank-js"
99
+ }
100
+
101
+ Once this is done you should be able to run up a swank for this project by
102
+ running:
103
+
104
+ npm run swank
105
+
106
+ Alternatively you can install swank-js globally by running:
107
+
108
+ npm install -g swank-js
109
+
110
+ Once installed you could run it from you project directory:
99
111
100
- node swank. js
112
+ swank- js
101
113
102
- Make SLIME connect to the backend using M-x slime-connect and
103
- specifying localhost and port 4005. You will see REPL buffer with the
104
- following prompt:
114
+ Make SLIME connect to the backend using ` M-x slime-connect ` and
115
+ specifying ` localhost ` and port ` 4005 ` . You will see REPL buffer
116
+ with the following prompt:
105
117
106
118
NODE>
107
119
0 commit comments