BuckleScript inherits the command line arguments of the [OCaml compiler](http://caml.inria.fr/pub/docs/manual-ocaml/comp.html). It also adds several flags:

* -bs-files

So that you can do

```bash
bsc -c -bs-files *.ml *.mli
```
The compiler will sort the order of input files before starting compilation.

BuckleScript supports two compilation mode, script mode and package mode, in package mode, 
you have to provide `package.json` on top and set the options `-bs-package-name`, `-bs-package-output`.
In script mode, such flags are not needed

* -bs-package-name
The project name of your project, user is suggested to make it consistent with the `name` field in `package.json`

* -bs-packge-output

The format is `module_system:oupt/path/relative/to/package.json`
Currently supported module systesms are: `commonjs`, `amdjs` and `goog:<namespace>`

For example, when you want to use the `goog` module system, you can do things like this:

```bash
bsc -bs-package-name your_package -bs-package-output goog:lib/goog xx.ml 
```
> Note that user can supply multiple `-bs-package-output` at the same time

You would then need a bundler for the different module systems: `webpack` supports `commonjs` and `amdjs` while `google closure compiler` supports all.

*  -bs-gen-tds

Trigger the generation of TypeScript `.d.ts` files.

## Hello world

Currently, `BuckleScript` shares the same command line options as `ocamlc`
bytecode compiler.

Create a file called `hello.ml` as below

```sh
echo 'print_endline "hello world"' > hello.ml
```

```sh
bsc -c hello.ml
```

If everything goes well, you should have `hello.js`

```
console.log('hello world')
```
