-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSitefile.yaml
executable file
·217 lines (177 loc) · 5.83 KB
/
Sitefile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
#!/usr/bin/env sitefile
#
# Sitefile for node-sitefile document server
# A note of caution: this example config does shameless things like executing any shell
# script if you want to, like call http://localhost/clean.sh. Ymmv.
#
# Id: node-sitefile/0.0.6-dev+20161010
sitefile: 0.0.6-dev
showStackError: true
paths:
routers_replace: false
routers:
- 'sitefile:example/routers'
#autoExport:
# - rjs: /app/rjs
routes:
media/script/dhtml.js: coffee:lib/sitefile/client/dhtml.coffee
media/script/sitefile-client.js: static:build/client/sf-v0.js
media/style: static:build/style
doc/literate: static:build/docs/docco/
example: static:example
# FIXME: example/: redir:example/main
example/bookshelf/knex.sqlite/_/v1: bookshelfapi:example/bookshelf/knex.json
example/bookshelf/knex: knex:example/bookshelf/knex.json
# Example, get data from another endpoint, the one above?
# XXX: example/bookshelf/knex/query-1: knex.sql:example/bookshelf/sql.coffee?knex=..
_pug: pug:example/pug-*.pug
_stylus: stylus:example/**/*.styl
_sass: sass:example/**/*.sass
_coffee: coffee:example/**/*.coffee
_markdown: markdown:*.md
_markdown_1: markdown:example/**/*.md
_sh: sh:example/*.sh
_gv: gv:example/*.gv
# FIXME: aliases _pu: pu:example/*.pu
_pu: plantuml:example/*.plantuml
_pu_dev_doc: plantuml:doc/dev/*.plantuml
_json: data.json:example/*.json
mocha/client/*: mocha.client:#
mocha/server/*: mocha.test:#
# Some defaults for root
'': redir:ReadMe
index: redir:ReadMe
# Example routes for ReadMe
#ReadMe: du:ReadMe.rst # Du defaults to HTML
#ReadMe: redir:ReadMe.html
#ReadMe.html: du:ReadMe.rst
#ReadMe.xml: du:ReadMe.rst
# Dynamic rules using glob spec
_du: du:**/*.rst
#_rst2html: rst2html:**/*.rst
gitflow: du:.gitflow.rst
Sitefile: redir:Sitefile.yaml
Sitefile.yaml: static:Sitefile.yaml
Sitefile.json: sitefile:?resolve=sitefile
Sitefile/debug: sitefile:#
Sitefile/resource: sitefile.resource:#
Sitefile/handler: sitefile.handler:#
Sitefile/global: sitefile.global:#
Sitefile/core/auto: core.autocomplete:#
Sitefile/core: core:#
# Proxy JSON metadata, settings in options.local.npm/...
npm/npm/latest.json: http:#
npm/node-sitefile/latest.json: http:#
# Look for installed package in PWD and Sitefile dir
npm/packages/: 'static:{,sitefile:}node_modules/'
# FIXME: display current PM2 procs and/or preconfigured apps status
proc/pm2: pm2:pm2-apps.json
# Some HTTP redirect handlers configured on JSON mappings
vendor/:package.:format: http.vendor:cdn.json
r:ref/(.*): http.ref:#
r:res/(.*): http.res:#
site/:site/:path: http.site:sites.json
# Three seperate resources, layered for the RequireJS client.
# The JSON is a path object extracted from cdn.json, and a shim and map and
# other RequireJS option objects.
app/rjs-sf-v0.json: rjs.config:paths=$ref:cdn.json#/js/http/packages;baseUrl=/app;main=cs!sf-v0
# The JSON is wrapped in a script to initialize RequireJS
app/rjs-sf-v0.js: rjs.main:app/rjs-sf-v0.json
# Finally a specific router is wired to display a pug template with all of the
# above.
app/v0: pug:sitefile-client:sf-v0.pug#
# Serve coffee script for RequireJS client
app: static:lib/sitefile/client
# FIXME: fonts? want to build CSS+font loading into RequireJS client
fonts: static:node_modules/bootstrap/fonts
# Just an instance of the example router in example/routers
sf-example/default: sf-example:#
sf-example/data1: sf-example.data1:#
sf-example/data2: sf-example.data2:#
local: static:public/local
# TODO: imagemacking processing?
#/shadows/:path: convert.filter:**/*.png
tools: static:tools
_pug_server: pug:example/server-*.pug
_pug_prism: pug:example/prism*.pug
_pug_polymer: pug:example/polymer*.pug
options:
global:
du:
link_stylesheets: true
scripts:
$ref: '#/defs/scripts/default'
stylesheets:
$ref: '#/defs/stylesheets/default'
rst2html:
link_stylesheets: true
flags:
- "--no-toc-backlinks"
scripts:
$ref: '#/defs/scripts/default'
stylesheets:
$ref: '#/defs/stylesheets/default'
#pug:
# merge:
# scripts:
# $ref: '#/defs/scripts/default'
# stylesheets:
# $ref: '#/defs/stylesheets/default'
local:
npm/node-sitefile/latest.json:
spec:
hostname: 'registry.npmjs.org'
path: '/node-sitefile/latest'
npm/npm/latest.json:
spec:
hostname: 'registry.npmjs.org'
path: '/npm/latest'
Sitefile/debug:
local_var: 'fooooo'
app/v0:
merge:
stylesheets:
- /vendor/bootstrap.css
- /vendor/jquery-ui.css
scripts:
- /vendor/jquery.js
clients:
$ref: '#/defs/app/v0/clients'
example/server-generated-page:
merge:
stylesheets:
- /vendor/bootstrap.css
- /vendor/bootstrap-theme.css
- /media/style/default.css
- /example/server-generated-stylesheet
scripts:
- /vendor/jquery.js
#- /vendor/require.js
#- /vendor/source-map-support.js
- /vendor/coffee-script.js
- /example/server-generated-javascript
links:
- type: text/coffescript
href: /example/script.coffee
defs:
scripts:
default:
- /vendor/jquery.js
#- /vendor/require.js
#- /vendor/source-map-support.js
- /vendor/coffee-script.js
#- src: /media/script/sitefile-client.js
# path: build/client/default.js
stylesheets:
default:
- url: /vendor/bootstrap.css
- url: /vendor/bootstrap-theme.css
- url: /media/style/default.css
path: build/style/default.css
app:
v0:
clients:
- type: require-js
id: require-js-sitefile-v0-app
href: /vendor/require.js
main: /app/rjs-sf-v0.js