Skip to content

Commit 4772d68

Browse files
committed
feat: first approach to the offline editio
This should help to make the main page simpler because it does not include tiddlypouch anymore and does not generate the actual download. offline version is just another edition created during CI
1 parent c89f5d1 commit 4772d68

File tree

6 files changed

+43
-13
lines changed

6 files changed

+43
-13
lines changed

.travis.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,20 @@ script:
1717
- npm run build-plugin
1818
# ===== Build the editions
1919
- tiddlywiki ./wiki --verbose --output ./dist --build index --build favicon --build library
20-
- tiddlywiki ./editions/online --verbose --build index
21-
- tiddlywiki ./editions/markdown --verbose --build index
22-
- tiddlywiki ./editions/importer --verbose --build index
23-
- tiddlywiki ./editions/gsd5 --verbose --build index
24-
- tiddlywiki ./editions/developer --verbose --build index # build the developer edition
20+
- ./build-editions.sh
2521
# ===== Non Minified version =====
2622
- "(cd ./tpouch && gulp travis)" # Build non minified version of TPouch code ( no --production flag )
2723
- tiddlywiki ./editions/online --verbose --build dev # This is the same as the online one, but to a different dist path
2824
# ===== Build edge version with the latest tiddlywiki and experimental plugins =====
2925
- "npm i tiddlywiki@latest && npx tiddlywiki --version"
3026
- "npx tiddlywiki ./editions/edge --verbose --build index" # build the edge edition (includes not well tested stuff)
3127
# === Measures file sizes and adds that data to the pull request ===
32-
- python node_modules/travis-weigh-in/weigh_in.py dist/developer/index.html || true
33-
- python node_modules/travis-weigh-in/weigh_in.py dist/markdown/index.html || true
34-
- python node_modules/travis-weigh-in/weigh_in.py dist/online/index.html || true
35-
- python node_modules/travis-weigh-in/weigh_in.py dist/edge/index.html || true
36-
- python node_modules/travis-weigh-in/weigh_in.py dist/dev/index.html || true
28+
- |
29+
for edition in $(ls dist); do
30+
python node_modules/travis-weigh-in/weigh_in.py dist/${edition}/index.html || true
31+
done
3732
- python node_modules/travis-weigh-in/weigh_in.py dist/index.html || true
33+
- python node_modules/travis-weigh-in/weigh_in.py dist/offline.html || true
3834
after_script:
3935
- "ls -lR dist"
4036
deploy:

build-editions.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
for edition in $(ls editions); do
4+
yarn tiddlywiki ./editions/$edition --verbose --build index
5+
done
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
title: $:/config/OfficialPluginLibrary
2+
tags: $:/tags/PluginLibrary
3+
url: https://noteself.github.io/PluginLibrary.html
4+
caption: {{$:/language/OfficialPluginLibrary}}
5+
6+
{{$:/language/OfficialPluginLibrary/Hint}}
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title: $:/
2+
3+
themes/tiddlywiki/vanilla/options/sidebarlayout: fluid-fixed

editions/offline/tiddlywiki.info

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"plugins": [
3+
"danielo515/pouchdb",
4+
"danielo515/tiddlypouch",
5+
"noteself/online",
6+
"noteself/build-tools"
7+
],
8+
"themes": [
9+
"tiddlywiki/vanilla",
10+
"tiddlywiki/snowwhite"
11+
],
12+
"languages": [
13+
"en-US"
14+
],
15+
"build": {
16+
"index": [
17+
"--output", "./dist",
18+
"--rendertiddler", "$:/core/save/all", "offline.html", "text/plain"
19+
]
20+
}
21+
}

wiki/tiddlers/Site/site_download.tid

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
title: $:/TiddlyPouch/Site/Buttons/Download
22

3-
<$button class="tc-btn-big-green">
4-
<$action-sendmessage $message="tm-download-file" $param="$:/NoteSelf/save/download" filename="noteself.html"/>
3+
<a class="tc-btn-big-green" download="noteself.html" href="offline.html">
54
Download
6-
</$button>
5+
</a>

0 commit comments

Comments
 (0)