文件user.clj应该放在哪里? [英] Where should the file user.clj go?

查看:76
本文介绍了文件user.clj应该放在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置proto-repl原子编辑器程序包,显然它需要一个文件user.clj存在于某个地方-我猜这是leiningen的init文件.

I am trying to setup proto-repl atom-editor package and apparently it needs a file user.clj to exist somewhere - which I guess is some leiningen's init file.

我应该在哪里创建该文件?

Where should I create this file?

推荐答案

如果找到了文件,Clojure将从您的类路径中加载文件user.clj.在默认的leinengen项目中,src/将位于类路径上,因此,如果创建src/user.clj,则该文件的内容将被加载到user命名空间的上下文中.

Clojure will load the file user.clj from your class path if it is found. In a default leinengen project src/ will be on the class path, so if you create src/user.clj the contents of that file will be loaded in the context of the user namespace.

user是clojure repl的默认名称空间,但是一些leiningen项目将其覆盖.为了访问user.clj中的定义,您将需要将user拉入范围(使用requireuse),或者确保user是您的起始命名空间.

user is the default namespace for the clojure repl, but some leiningen projects override this. In order to access definitions in user.clj you will need to either pull user into scope (using require or use) or make sure that user is your starting namespace.

这篇关于文件user.clj应该放在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆