1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-22 10:43:11 +00:00

Rename and add versioning to downloaded tiddlywiki core JS

* Rename "tiddlywiki5.js" to "twcore-VERSION.js"

* Preload $:/config/SaveWikiButton/Template tiddler with the required
  external-js template value.
This commit is contained in:
Cindy Ruan 2021-04-04 17:40:07 -07:00
parent 6cdc80085c
commit dc41487079
6 changed files with 10 additions and 9 deletions

View File

@ -1,3 +1,3 @@
title: $:/core/templates/load-external-js
&lt;script src="<<coreURL>>" onerror="alert('Error: Cannot load tiddlywiki5.js');">&lt;/script>
&lt;script src="<<coreURL>>" onerror="alert('Error: Cannot load <<coreURL>>');">&lt;/script>

View File

@ -4,5 +4,5 @@ title: $:/core/save/all-external-js
\define saveTiddlerFilter()
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
\end
\define coreURL() %24%3A%2Fcore%2Ftemplates%2Ftiddlywiki5.js
\define coreURL() %24%3A%2Fcore%2Ftemplates%2Ftwcore.js
{{$:/core/templates/tiddlywiki5-external-js.html}}

View File

@ -4,5 +4,5 @@ title: $:/core/save/offline-external-js
\define saveTiddlerFilter()
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
\end
\define coreURL() tiddlywiki5.js
\define coreURL() twcore-$(version)$.js
{{$:/core/templates/tiddlywiki5-external-js.html}}

View File

@ -1,4 +1,4 @@
title: $:/core/templates/tiddlywiki5.js
title: $:/core/templates/twcore.js
\rules only filteredtranscludeinline transcludeinline codeinline
@ -10,6 +10,6 @@ title: $:/core/templates/tiddlywiki5.js
<!--~~ Boot prefix ~~-->
{{ $:/boot/bootprefix.js ||$:/core/templates/plain-text-tiddler}}
<!--~~ Core plugin ~~-->
{{$:/core/templates/tiddlywiki5.js/tiddlers}}
{{$:/core/templates/twcore.js/tiddlers}}
<!--~~ Boot kernel ~~-->
{{ $:/boot/boot.js ||$:/core/templates/plain-text-tiddler}}

View File

@ -1,5 +1,9 @@
title: $:/core/templates/tiddlywiki5.js/tiddlers
title: $:/core/templates/twcore.js/tiddlers
`
$tw.preloadTiddlerArray(`<$text text=<<jsontiddlers "[[$:/core]]">>/>`);
$tw.preloadTiddlerArray([{
title: "$:/config/SaveWikiButton/Template",
text: "$:/core/save/offline-external-js"
}]);
`

View File

@ -1,3 +0,0 @@
title: $:/config/SaveWikiButton/Template
$:/core/save/offline-external-js