README [skip ci]
This commit is contained in:
parent
3e874cbc02
commit
84eb27a2a0
1 changed files with 9 additions and 19 deletions
28
README.md
28
README.md
|
|
@ -204,13 +204,12 @@ REPL:
|
||||||
If neither -e, -f, or --socket-repl are specified, then the first argument that is not parsed as a option is treated as a file if it exists, or as an expression otherwise. Everything after that is bound to *command-line-args*. Use -- to separate script command line args from bb command line args.
|
If neither -e, -f, or --socket-repl are specified, then the first argument that is not parsed as a option is treated as a file if it exists, or as an expression otherwise. Everything after that is bound to *command-line-args*. Use -- to separate script command line args from bb command line args.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Built-in namespaces
|
### Built-in libraries
|
||||||
|
|
||||||
The following namespaces are required by default. Some are available through
|
In addition to `clojure.core`, the following namespaces are available. Some are
|
||||||
pre-defined aliases in the `user` namespace, which can be handy for
|
available through pre-defined aliases in the `user` namespace, which can be
|
||||||
one-liners. You may use `require` + `:as` and/or `:refer` on these
|
handy for one-liners. If not all vars are available, they are enumerated
|
||||||
namespaces. If not all vars are available, they are enumerated explicitly.
|
explicitly.
|
||||||
The `clojure.core` functions are accessible without a namespace alias.
|
|
||||||
|
|
||||||
- `babashka.curl` (see [here](#babashkanamespaces))
|
- `babashka.curl` (see [here](#babashkanamespaces))
|
||||||
- `clojure.data`
|
- `clojure.data`
|
||||||
|
|
@ -245,20 +244,11 @@ See the
|
||||||
[libraries](https://github.com/borkdude/babashka/blob/master/doc/libraries.md)
|
[libraries](https://github.com/borkdude/babashka/blob/master/doc/libraries.md)
|
||||||
page for libraries that are not built-in, but which you can load via the classpath.
|
page for libraries that are not built-in, but which you can load via the classpath.
|
||||||
|
|
||||||
A selection of java classes are available, see `babashka/impl/classes.clj`.
|
See the [build](https://github.com/borkdude/babashka/blob/master/doc/build.md)
|
||||||
|
page for namespaces that can be enabled via feature flags, if you want to
|
||||||
|
compile babashka yourself.
|
||||||
|
|
||||||
Babashka supports `import`: `(import clojure.lang.ExceptionInfo)`.
|
A selection of Java classes are available, see `babashka/impl/classes.clj`.
|
||||||
|
|
||||||
Babashka supports a subset of the `ns` form where you may use `:require` and `:import`:
|
|
||||||
|
|
||||||
``` shellsession
|
|
||||||
(ns foo
|
|
||||||
(:require [clojure.string :as str])
|
|
||||||
(:import clojure.lang.ExceptionInfo))
|
|
||||||
```
|
|
||||||
|
|
||||||
For the unsupported parts of the ns form, you may use [reader
|
|
||||||
conditionals](#reader-conditionals) to maintain compatibility with JVM Clojure.
|
|
||||||
|
|
||||||
### Running a script
|
### Running a script
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue