refactor(mako): put API relevant stuff into subdir

This is the first of many changes to come.
We try to leverage our ability to merge multiple data source into one
to abstract away what we are actually doing, and of course, to allow
sharing the majority of the code, were applicable.
This commit is contained in:
Sebastian Thiel
2015-03-23 16:13:02 +01:00
parent d1c5bf1e4a
commit 137ba8caf3
11 changed files with 45 additions and 23 deletions

29
etc/api/api.yaml Normal file
View File

@@ -0,0 +1,29 @@
api:
base_path: "etc/api"
terms:
# how to actually do something with the API
action: doit
# when a resource is supposed to be uploaded
upload_action: upload
properties:
# additional fields specified by the user
params: '_additional_params'
# custom scopes for authentication
scopes: '_scopes'
make:
target_suffix:
depends_on:
templates:
# all output directories are relative to the one set for the respective API
- source: README.md
- source: LICENSE.md
- source: ../Cargo.toml
- source: lib.rs
output_dir: src
cargo:
build_version: "0.1.1"
keywords: [protocol, web, api]
dependencies:
- url = "*"
- serde = "*"
- serde_macros = "*"

9
etc/api/cli.yaml Normal file
View File

@@ -0,0 +1,9 @@
make:
target_suffix: cli
depends_on: api
templates:
- source: main.rs
output_dir: src
cargo:
build_version: "0.0.1"
keywords: [cli]

View File

@@ -8,25 +8,6 @@ directories:
api_base: etc/api
# all mako source files
mako_src: src/mako
api:
base_path: "etc/api"
terms:
# how to actually do something with the API
action: doit
# when a resource is supposed to be uploaded
upload_action: upload
properties:
# additional fields specified by the user
params: '_additional_params'
# custom scopes for authentication
scopes: '_scopes'
templates:
# all output directories are relative to the one set for the respective API
- source: README.md
- source: LICENSE.md
- source: Cargo.toml
- source: lib.rs
output_dir: src
cargo:
build_version: "0.1.1"
repo_base_url: https://github.com/Byron/google-apis-rs
@@ -34,7 +15,7 @@ cargo:
authors:
# don't forget to possibly add them to copyright authors
- Sebastian Thiel <byronimo@gmail>
keywords: [google, protocol, web, api]
keywords: [google]
# All APIs should live in the same repository
repository_url: https://github.com/Byron/google-apis-rs
urls: