Last active
August 30, 2016 12:55
-
-
Save kurogelee/9d814bd01afa02086ae526cdc24fbec9 to your computer and use it in GitHub Desktop.
Atomのinit.coffeeをinit.cljs(ClojureScript)で置き換える方法 ref: http://qiita.com/kurogelee/items/b198733771ae1c7e35ac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.log js/console global.atom) | |
(.log js/console global.atom.commands) | |
(.. global.atom.commands | |
(add "atom-text-editor" "cljs:sample-linefirst" | |
#(.. global.atom.workspace | |
getActiveTextEditor | |
getLastCursor | |
moveToFirstCharacterOfLine))) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os = require 'os' | |
path = require 'path' | |
fs = require 'fs' | |
cljs = require 'clojurescript' | |
cljs.context.atom = atom | |
cljs.context.protoRepl = protoRepl | |
initCljs = path.join os.homedir(), '.atom/init.cljs' | |
fs.readFile initCljs, 'utf8', (err, data) -> | |
throw err if err | |
cljs.eval("(do #{data})") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment