Skip to content

Latest commit

 

History

History
111 lines (75 loc) · 3.78 KB

CONTRIBUTING.MD

File metadata and controls

111 lines (75 loc) · 3.78 KB

Contributing

Welcome, if you are here it is probably that you want to contribute. Here are some advice to get you started!

Don't hesitate to ask question on the issue tracker or on unveil matrix channel. There is no dumb question and we will be happy to answer!

Getting started

First of all, if you don't know what to do, you probably want to pick an issue. You might be interested in the EASY ones to get started.

If you find a bug or have an idea for a new feature, don't hesitate to fill an issue, suggestions are welcome.

Unveil has two main part :

  1. The Rust part which generate static assets for the presentation. The rust logic involve a little bit of parsing and pre-processing, handle the live reload server and manipulate the file system. Issues related to these topics have the Rust tag.

  2. The Javascript and CSS part, which are the default generated assets for the static presentation site. Those files are located in the src/assets directory. If you are going to participate on this topic you must be aware that the index.html file is generated in by the Rust code using the horrorshow crate. Issues related to this have either the JS or the CSS or both.

Cloning the project

To start making changes, clone or fork the project :

git clone https://github.com/oknozor/unveil-rs.git

You can then run cargo build inside the unveil-rs directory and start coding !

Conventional commit

Unveil use the conventional commit spec. Please take time to read the document before submitting your changes.

Code quality

Unveil use rustfmt to format the code and clippy to detect mistakes. Please install them and run those command before submitting a pull request (this is not needed if you are only making changes to Javascript or CSS files).

rustfmt

  1. install :

    rustup component add rustfmt
  2. run :

    run this command inside unveil project directory:

    cargo fmt --all

install clippy

  1. install :

    rustup component add clippy
  2. run : run this command inside unveil project directory

    cargo clippy

Contributing to the Javascript/CSS part

The most straightforward way to start editing the front-end is to install your version of unveil :

cargo install --path . 

You can then use unveil to init a presentation project :

unveil init test_presentation
cd test_presentation
unveil build

Editing existing assets

Once you unveil project is build you can edit existing assets in the public directory. Be careful when making changes, you don't want to use live-reload : running unveil serve on your project will override some assets on re-build.

Adding new assets

If you want to add a javascript library or additional css stylesheet to the project you need include them in the generated assets on rust side. This happens in assets/mod.rs and unveil.rs. If you need help on how to do this, don't hesitate to ask.

Submit a pull request

You are done making changes ? Congrats ! You can now submit a pull request on github.