spin

A project generator for Reason and OCaml
README

๐Ÿš€ Quickly start new projects that are ready for the real world.

โค๏ธ Have a great developer experience when developing with Reason/OCaml.

๐Ÿ„ Be as productive as Ruby-on-Rails or Elixir's Mix users.

๐Ÿ”Œ Establish a convention for projects organizations to make it easy to get into new projects.

Installation

Using Homebrew (macOS)

brew install tmattio/tap/spin

Using Opam

opam install spin

Using npm

yarn global add @tmattio/spin
# Or
npm -g install @tmattio/spin

Using a script

curl -fsSL https://github.com/tmattio/spin/raw/master/script/install.sh | bash

Templates

You can generate a new project using a template with spin new. For instance:

spin new bin my_app

Will create a new binary application in the directory ./my_app/

Anyone can create new Spin templates, but we provide official templates for a lot of use cases.

Official templates

The official Spin templates templates are the following:

  • bin - Native project containing a binary.

  • cli - Command Line Interface releasable on Opam.

  • lib - Library releasable on Opam.

  • ppx - PPX library with prebuilt binaries for native and bucklescript.

  • spa - Single page application with Js_of_ocaml

If you'd like to add an official template, don't hesitate to open a PR!

Other templates

Here are some non-official Spin templates that you can:

Usage

For a detailed documentation of Spin's CLI, run spin --help, or refer to the [CLI documentation](https://github.com/tmattio/spin/tree/master/doc/cli.md].

spin new TEMPLATE [PATH] [--default] [--ignore-config]

Create a new ReasonML/Ocaml project from a template.

PATH defaults to the current working directory.

When --default is passed, the user will not be prompted for configurations that have a default value.

When --ignore-config is passed, the configuration file will be ignored and the user will be prompted for all the configurations.

spin ls

List the official Spin templates.

spin gen

List the generators available for the current project.

spin gen GENERATOR

Generate a new component in the current project.

spin config

Prompt the user for values that can be saved in the configuration file.

If a value is present in the configuration file, it will not be prompted when generating a new project.

Roadmap

See our development board for a list of selected features and issues.

Contributing

We'd love your help improving Spin!

Take a look at our Contributing Guide to get started.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Thanks to everyone who contributed to Spin!

Special thanks to @wesoudshoorn for creating Spin's logo.

Install
Published
08 Oct 2020
Maintainers
Sources
spin-0.7.0.tbz
sha256=d151cf6aee92c3b6f2d596b11b5d1ac2c75d554b681aa736b6293981344d062c
sha512=e80ec9d40eecace6684308960ea224b81ce6e2fc8e81201c99702d13b3d888b7f2de9379777c94719bf679ee6ed10e3a83668064bba36cf1121f1f6628539046
Dependencies
inquire
>= "0.2.1" & < "0.3.0"
jingoo
>= "1.3.0"
lwt
>= "5.3.0"
sexplib
>= "v0.13"
fmt
>= "0.8.7"
base
>= "v0.13"
crunch
build
odoc
with-doc
alcotest
with-test
dune
>= "2.7"
ocaml
>= "4.08.0"
Reverse Dependencies