Skip to content

Latest commit

 

History

History
105 lines (74 loc) · 2.34 KB

CONTRIBUTING.md

File metadata and controls

105 lines (74 loc) · 2.34 KB

Contributing

Setup your development environment

First, you will need to install npm to install Javascript dependencies.

In asset/:

npm install

You need Opam, you can install it by following Opam's documentation.

With Opam installed, you can install the dependencies with:

make dev

Then, build the project with:

make build

Running the app

Building the project will perform the following steps:

  • Generate a file main.js that will inject our application in the #root element of index.html.
  • Generate a file main.css that is required by index.html

To run the application, we install serve as a dev dependencies. You can run a web server with the content of asset/static with:

cd asset && npm start

Or, alternatively, you can use the make alias:

make start

Running Tests

You can run the test compiled executable:

make test

Building documentation

Documentation for the libraries in the project can be generated with:

make doc
open-cli $(make doc-path)

This assumes you have a command like open-cli installed on your system.

NOTE: On macOS, you can use the system command open, for instance open $(make doc-path)

Repository Structure

The following snippet describes demo's repository structure.

.
├── asset/
|   Contains the javascript environment and the static assets.

├── asset/static/
|   Static assets of the application.
│
├── bin/
|   Source for jsoo-css-demo's compiled application. This links to the library defined in `lib/`.
│
├── lib/
|   Source for demo's library. Contains demo's core functionnalities.
│
├── test/
|   Unit tests and integration tests for demo.
│
├── dune-project
|   Dune file used to mark the root of the project and define project-wide parameters.
|   For the documentation of the syntax, see https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
│
├── LICENSE
│
├── Makefile
|   Make file containing common development command.
│
├── README.md
│
└── jsoo-css-demo.opam
    Opam package definition.
    To know more about creating and publishing opam packages, see https://opam.ocaml.org/doc/Packaging.html.