Hi guys, happy new year :)
I've successfully modified a couple of tests and will make a pull request
once I build a complete set of tests for extended slices, now I think I can
become a maintainer, although there's a number things to learn still (most
notably, how to update classic.tiddlywiki.com once a new version is ready).
Jeremy, let me know how should I proceed for this.
Another thing to note is I've found a probable source of those multiple
TypeError:
Cannot read property 'formatterRegExp' of null errors when tests.html is
opened. Since I've faced this error before in a plugin where the problem
was formatter is built before plugins are loaded and the plugin used
getPageTitle, I've suspected tests are launched before main – and it looks
so: first, the accepted answer at [1] suggests that window.onload (which,
as [2] suggests, is the same as <body onload=...>) fires later than
jQuery(document).ready(..); second, if (in tests.html) in
test("generateRss: feed for an empty store", function() {
I put
alert('1');
alert(formatter);
var rss = generateRss();
alert('2');
instead of just var rss = generateRss();, I see the '1' alert before all of
those error alerts, second alert indicates that formatter is actually null,
then 5 of those errors are shown and then goes '2'.
It is tempting to use the same hack I've used in the plugin I've mentioned
before: substitute
problematicFunctionThatNeedsFormatterToBeBuilt();
with
formatter = new Formatter(config.formatters);
problematicFunctionThatNeedsFormatterToBeBuilt();
formatter = null;
but I'm not sure yet if that can trick some tests and it feels like there
should be a more consistent approach to this. Any suggestions? By the way,
if I extend the example above like this:
alert('1');
var formatterCash = formatter;
formatter = new Formatter(config.formatters);
var rss = generateRss();
formatter = formatterCash;
alert('2');
all error messages between '1' and '2' alerts go away and all the "3.
GenerateRss" tests are passed.
Best regards,
Yakov.
[1] https://stackoverflow.com/a/3698214/3995261
[2] https://stackoverflow.com/a/191318/3995261
среда, 27 декабря 2017 г., 18:52:15 UTC+3 пользователь Yakov написал:
>
> Hi Jeremy,
>
> I wanted to write once I manage to correct at least one test and be ready
> to become a maintainer of TWc, but as a short note: yeap, now building
> works somewhat as expected and I also made a pull request to the
> tiddlywiki.com repo [1] to clarify the docs (I'll make some more
> suggestions later, the description definitely should be refactored to
> simplify the process for beginners).
>
> Best regards,
> Yakov.
>
> [1] https://github.com/TiddlyWiki/tiddlywiki.com/pull/29
>
> вторник, 19 декабря 2017 г., 1:52:32 UTC+3 пользователь Jeremy Ruston
> написал:
>>
>> Hi Tobias
>>
>> Was there a particular necessity why the TWC build process involves
>> recipes and also phantom.js?
>>
>>
>> The recipe files have been part of the TWC build process since 2005;
>> they're implemented in TW5 via the "classictools” plugin.
>>
>> We integrated Phantom.js sometime between 4 and 8 years ago. The final
>> stage of the build process is to run TWC under Phantom.js in order to
>> generate the index.xml RSS file.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>> Especially the former appear to complicate things a lot and make it
>> somewhat less intuitive to build custom wikis.
>>
>> best -tb
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "TiddlyWikiDev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/tiddlywikidev.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tiddlywikidev/d48692bc-a6d1-4fd2-b5d1-9fbef95657ef%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/tiddlywikidev/d48692bc-a6d1-4fd2-b5d1-9fbef95657ef%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywikidev/92ae0b9e-e194-4a0c-81e4-dd34f27e02ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.