Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clio docs #216

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/build/html/versions/develop/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a306372ca58b6066a43fb24f7689f4f7
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:root {
--tabs-color-label-active: hsla(231, 99%, 66%, 1);
--tabs-color-label-inactive: rgba(178, 206, 245, 0.62);
--tabs-color-overline: rgb(207, 236, 238);
--tabs-color-underline: rgb(207, 236, 238);
--tabs-size-label: 1rem;
}
30 changes: 30 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/build.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Clio build
==========

This command can be used to build a Clio project. Simply run this
command in the root of your project, where ``clio.toml`` file exists:

.. code:: bash

clio build

Command Syntax and Options
--------------------------

.. code:: console

$ clio build --help

clio build [config]

Build a Clio project

Options:
--version Show version number [boolean]
--config Config file, or a directory to read configs from.
[string] [default: "."]
--skip-bundle Does not produces a bundle for browsers. [boolean]
--skip-npm-install Skips npm install. Useful for tests. [boolean]
--silent Mutes messages from the command. [boolean]
--clean Wipe the build directory before build [boolean]
-h, --help Show help [boolean]
10 changes: 10 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/completion.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clio completion
===============

Clio executable provides auto-completion script for various shells. You
can run the below command to see how you can activate this feature for
your shell:

.. code:: bash

clio completion
136 changes: 136 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/deps.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
clio deps
=========

List dependencies
-----------------

Use ``clio deps`` to show a Clio project dependencies:

.. code:: console

$ clio deps

~> stdlib: latest
~> rethinkdb: 2.3.3

Command Syntax and Options
--------------------------

.. code:: console

$ clio deps --help

clio deps

Manage clio dependencies

Commands:
clio deps add <source> [config] Add a new dependency
[options]
clio deps get [config] Download every dependency listed in
the package config file

Options:
--version Show version number [boolean]
-h, --help, --help Show help [boolean]

Add dependencies
----------------

You can install from a url (compressed package), a git repository
(@version eg. ``@1.2.2`` is supported) or from the official Clio
repository. For a list of packages that exist in the official repository
you can visit the `official package index repo`_.

Use ``clio deps add`` to fetch and install the dependencies.

Github format
~~~~~~~~~~~~~

To install from the master branch of a Github repository:

.. code:: bash

clio deps add github.com/clio-lang/rethinkdb

To install from a specific branch of a Github repository:

.. code:: bash

clio deps add github.com/foo/bar@tagname

For example this,

.. code:: bash

clio deps add github.com/clio-lang/rethinkdb@v2.3.3

installs the .zip file listed at
https://github.com/clio-lang/rethinkdb/releases/tag/v2.3.3
(https://github.com/clio-lang/rethinkdb/archive/v2.3.3.zip).

URL format
~~~~~~~~~~

To install from a generic URL:

.. code:: bash

clio deps add https://a-domain.com/path/to/content.zip

To install from a specific Github tag URL:

.. code:: bash

clio deps add https://github.com/clio-lang/rethinkdb@v2.3.3.zip

Package id
~~~~~~~~~~

If a package is listed in the `Clio packages repository`_, you can just
use its name:

.. code:: bash

clio deps add package_name

You can choose to install a particular tag using this syntax:

.. code:: bash

clio deps add package_name@tag_id

For example to install `greeter`_:

.. code:: bash

clio deps add greeter

Npm packages
~~~~~~~~~~~~

If you want to add an npm package, you can pass ``--npm`` flag to this
command:

.. code:: bash

clio deps add --npm express

You can also pass the ``--dev`` flag to install npm dev dependencies:

.. code:: bash

clio deps add --npm --dev parcel

Download dependencies
---------------------

To fetch all of the dependencies listed in the package config file:

.. code:: bash

clio deps get

.. _official package index repo: https://github.com/clio-lang/packages/
.. _Clio packages repository: https://github.com/clio-lang/packages
.. _greeter: https://github.com/clio-lang/packages/blob/master/packages/greeter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
clio highlight
==============

To print a highlighted version of a Clio file in console, you can do:

.. code:: bash

clio highlight file.clio
31 changes: 31 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/host.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
clio host
=========

To host a Clio project you can run the following command in the root
directory of your Clio project:

.. code:: bash

clio host

Command Syntax and Options
--------------------------

.. code:: console

$ clio host --help

clio host [config]

Compile and host Clio file

Options:
--version Show version number [boolean]
--config Config file, or a directory to read configs from.
[string] [default: "."]
--silent Mutes messages from the command. [boolean]
--clean Wipe the build directory before build [boolean]
-h, --help Show help [boolean]

This command builds the project based on the passed config file, then
hosts the exposed functions.
16 changes: 16 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Clio Executable
===============

Clio executable provides several commands to work with Clio code:

.. toctree::
:maxdepth: 2
:caption: Commands

build
completion
deps
highlight
host
new
run
51 changes: 51 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/new.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
clio new
========

``clio new <project-name>`` is the quickest way to get started with
Clio!

Use it to generate a new project contained in a subdirectory.

.. code:: console

$ clio new x7

Getting 'stdlib' from the Clio packages repository (https://github.com/clio-lang/packages)
Downloading stdlib@latest...
Info: Added Clio dependencies
Info: Initialized new git repository.
Info: Initialization Complete!
Success: Run 'cd x7' to open, then 'clio run index.clio' to run the project!

Command Syntax and Options
--------------------------

.. code:: console

$ clio new --help

clio new <project>

Create a new Clio project

Options:
--version Show version number [boolean]
--project name of the project [string]
--target Choose a target for compilation (eg. JavaScript)
[string] [default: "js"]
--template Template to use for scaffolding [string] [default: "node"]
-h, --help Show help [boolean]

Templates
---------

Clio uses templates for creating the projects. Official templates are
“`web`_” and “`node`_”. The “web” template is setup to bundle your
project for the web, using `Parcel`_ bundler. You can use any git
repository as a template, just pass the clone address of the git to the
``--template`` flag (in form of ``https://address/of/git/repo`` or
``git@host:repo`` ).

.. _web: https://github.com/clio-lang/template-web
.. _node: https://github.com/clio-lang/template-node
.. _Parcel: https://parceljs.org/
31 changes: 31 additions & 0 deletions docs/build/html/versions/develop/_sources/cli/run.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
clio run
========

To run a Clio project, you can run the following command in the root
directory of your Clio project:

.. code:: bash

clio run

Command Syntax and Options
--------------------------

.. code:: console

$ clio run --help

clio run [config]

Compile and run Clio file

Options:
--version Show version number [boolean]
--config Config file, or a directory to read configs from.
[string] [default: "."]
--silent Mutes messages from the command. [boolean]
--clean Wipe the build directory before build [boolean]
-h, --help Show help [boolean]

This command builds the project based on the passed config file, then
runs it.
33 changes: 33 additions & 0 deletions docs/build/html/versions/develop/_sources/development/file.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
File Structure
==============

Packages
--------

Clio uses a single-repository approach to handle consistent releases. We
use `Lerna`_ in order to manage packages in the main repository. All
packages live in the ``packages/`` directory at the root of the
repository.

Tests
~~~~~

Tests are part of each package. They live in a ``./tests/`` directory
relative to the file being tested. To give an example:

.. code:: text

- tests/
- foo.test.js
- foo.js
- package.json

Documentation
-------------

All of the documentation for the Clio Programming Language lives in the
``docs/`` directory at the root of the repository. In order to keep our
docs consistent, we ensure that sufficient documentation is provided
within each pull request.

.. _Lerna: https://lerna.js.org/
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Development
===========

This section provides information on how to develop and extend Clio.

.. toctree::
:maxdepth: 2
:caption: Contents

file
Loading