Commit bdd8d499 authored by Bat's avatar Bat

Updated the docs

parent 65566e62
......@@ -17,16 +17,16 @@ The name of the project. It should only contain (small) letters, numbers or hyph
"my-project-123" # correct
"GTK+ App" # Incorrect : capitals, + and space
"42-the-meaning-of-live-and-co" # Incorrect : begins with a number
"42-the-meaning-of-life-etc" # Incorrect : begins with a number
```
This key is mandatory.
*This key is mandatory.*
### version
This is the version of your package. It should be a valid [semantic version](http://semver.org).
This key is mandatory.
*This key is mandatory.*
### description
......@@ -175,6 +175,8 @@ An interactive tool to create a new project.
Install all the specified libraries, or those present in `libs` in the manifest if none.
It clones the libraries, checkout to the most recent matching version, builds it and installs the result.
### lint [--elementary|--gnome|--both]
Lints your code, following the specified convention (defautl is elementary).
......@@ -198,7 +200,7 @@ Updates your packages to the latest version.
# Variables
poulp defines some environment varaibles when spawning a command. You can use them in `output`, `compilerParams` and your scripts.
poulp defines some environment varaibles when spawning a command. You can use them in `output`, `compiler-params` and your scripts.
- `$PROJECT_NAME`, the name of your project;
- `$PROJECT_VERSION`, the version of your project;
......@@ -211,76 +213,24 @@ poulp defines some environment varaibles when spawning a command. You can use th
*You can find a sample repository [here](https://gitlab.com/Bat41/poulp-repo-test/tree/master/dist).*
The remote repositories are organized as follow.
- /
- packages.json
- my-package/
- poulp.json
- my-package.vapi
- my-package.h
- my-package.so
- ...
- projects/
- projects.json
- my-template/
- main.vala
- poulp.json
- ...
- files/
- files.json
- foo.vala
- bar.gs
- ...
`packages.json` contains a list of all the packages available in this repository. It also contains two other fields `name` (the name of the repository) and `owner`, the name (and optionally email) of the administrator.
Every package is an object in the `libs` array, with those properties.
- name, the name/ID of the package, used by `poulp install name`. Normally, it is the same as the name in the `poulp.json` ;
- files, an object with at least one of this key :
- `all`, an array containing files for any platform (.pc, .vapi, .h, etc). The path are relative to the packages folder (see below) ;
- `windows`, windows specific files (`.dll` and Co.) ;
- `linux`, GNU/Linux specific files ;
- `osx`, Mac OS X specific files ;
- `bsd`, BSD specific files ;
- `unix`, an alias for `linux`, `osx` and `bsd`.
The repository should contain a folder named with the ID of the package at its root (`my-package` in the example above).
This folder should contains all the files specified in `packages.json`. It could also contain two special folders : projects and files. Those two folders respectively contains projects and files templates.
The `projects` directory should contain a `projects.json` file, that looks like this.
```json
[
{
"id": "my-project-template",
"name": "My project template",
"description": "An example template",
"files": [ "foo.vala", "poulp.json" ]
},
...
]
```
The remote repositories just contains one file, named `packages.json`. It contains a list of all the packages available in this repository. It also contains another field, `name`, which is the name of the repository.
Then, you should create a new subfolder in `projects`, that contains the files of the templates. If a `poulp.json` file is here, some of its property will be used when a new project is initialized with this template (actually, only `libs` and `keywords`).
This file has an object, named `packages` which contains key-value pairs of packages (the name is the key, and the git repository the value).
The `files` folders is quite similar to the `projects` one. It also contains a file, named `files.json`, containing a list of available file templates. This file looks like this.
*Example `package.json` file*
```json
[
{
"id": "my-file-template",
"name": "My file template",
"description": "A super cool file template",
"files": [ "bar.vala" ]
},
...
]
```
{
"name": "A little poulp repository",
"packages": {
"foo": "https://git.foo.org/foo.git",
"bar": "https://github.com/baz/bar",
"hello": "https://gitlab.com/hey/hello"
}
}
```
The files should be in the `files` folder, not in a subdirectory like for `projects`. You can specify many files, because it could be useful. For instance, you can have a GTK+ window template, with a `window.vala` file and `window.ui` file.
It is planed to make it possible for package to install templates, but not available yet.
----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment