1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-08 13:56:07 +00:00

Add --build command

First pass at the build system described in #356.

To test it, move to a new, empty directory and try `tiddlywiki
editions/tw5.com --verbose --build`
This commit is contained in:
Jermolene
2014-04-25 22:41:59 +01:00
parent 552657fc58
commit f7e50e0950
22 changed files with 292 additions and 40 deletions

View File

@@ -0,0 +1,7 @@
created: 20140425085548209
modified: 20140425085738745
tags: command
title: BuildCommand
type: text/vnd.tiddlywiki
{{$:/language/Help/build}}

View File

@@ -0,0 +1,4 @@
title: ClearPasswordCommand
tags: command
{{$:/language/Help/clearpassword}}

View File

@@ -0,0 +1,7 @@
created: 20140425085548209
modified: 20140425085738745
tags: command
title: OutputCommand
type: text/vnd.tiddlywiki
{{$:/language/Help/output}}

View File

@@ -24,6 +24,7 @@ The `tiddlywiki.info` file in a wiki folder contains a JSON object comprising th
* ''themes'' - an array of theme names to be included in the wiki
* ''languages'' - an array of language names to be included in the wiki
* ''includeWikis'' - an array of relative paths to external wiki folders to be included in the wiki
* ''build'' - a hashmap of named build targets, each defined by an array of command tokens (see BuildCommand)
* ''config'' - an optional hashmap of configuration options (see below)
Configuration options include:
@@ -34,16 +35,23 @@ For example:
```
{
"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem"
],
"includeWikis": [
"../tw5.com"
],
"config": {
"retain-original-tiddler-path": true
}
"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem"
],
"includeWikis": [
"../tw5.com"
],
"build": {
"index": [
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
"favicon": [
"--savetiddler","$:/favicon.ico","favicon.ico",
"--savetiddler","$:/green_favicon.ico","static/favicon.ico"]
},
"config": {
"retain-original-tiddler-path": true
}
}
```
@@ -55,26 +63,26 @@ Sub-folders within the `tiddlers` folder can also be given a `tiddlywiki.files`
```
{
"tiddlers": [
{
"file": "d3.min.js",
"fields": {
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/d3/d3.js",
"module-type": "library"
},
"prefix": "var d3;if($tw.browser){\n",
"suffix": "}\nexports.d3 = d3;\n"
},
{
"file": "cloud/d3.layout.cloud.js",
"fields": {
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/d3/d3.layout.cloud.js",
"module-type": "library"
}
}
]
"tiddlers": [
{
"file": "d3.min.js",
"fields": {
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/d3/d3.js",
"module-type": "library"
},
"prefix": "var d3;if($tw.browser){\n",
"suffix": "}\nexports.d3 = d3;\n"
},
{
"file": "cloud/d3.layout.cloud.js",
"fields": {
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/d3/d3.layout.cloud.js",
"module-type": "library"
}
}
]
}
```

View File

@@ -26,8 +26,30 @@
"zh-Hant",
"it-IT",
"ja-JP"
]
,
],
"build": {
"index": [
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
"encrypted": [
"--password", "password",
"--rendertiddler", "$:/core/save/all", "encrypted.html", "text/plain",
"--clearpassword"],
"favicon": [
"--savetiddler","$:/favicon.ico","favicon.ico",
"--savetiddler","$:/green_favicon.ico","static/favicon.ico"],
"readmes": [
"--rendertiddler","ReadMe","readme.md","text/html",
"--rendertiddler","ContributingTemplate","contributing.md","text/html",
"--rendertiddler","$:/core/copyright.txt","licenses/copyright.md","text/html"],
"empty": [
"--rendertiddler","$:/editions/tw5.com/download-empty","empty.html","text/plain",
"--rendertiddler","$:/editions/tw5.com/download-empty","empty.hta","text/plain"],
"static": [
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain",
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain"]
},
"config": {
"retain-original-tiddler-path": true
}