Commit graph

10 commits

Author SHA1 Message Date
C. Scott Ananian 8fbcef6d33 Updates to support jsduck 5.x
Change-Id: I16123e91370cb6a7785060c749530953f4c3ddf4
2013-09-23 13:46:26 -04:00
Timo Tijhof ba7b10962b docgen: Use new jsduck --color and --warnings-exit-nonzero option
Change-Id: I8a0d8bb8ece598991b9fd1b85cf618463a950fed
2013-04-30 20:53:22 +02:00
Timo Tijhof 60a0f97e35 makeStaticLoader: Implement --fixdir option
Currently when running this maintenance script it outputs
the full path to the i18n file. This was done that way because
of .docs/generate.sh (which pipes it to php through stdin).

This however means that currently the output is not suitable
for pasting into demo and test index files (as the path should
be relative for those).

The --fixdir option will function as toggle between a fixed
path to the directory on disk, or a dynamic resolution at
run-time. The default is the latter. generate.sh passes --fixdir.

Change-Id: Idebca553587aaff9b31255d884461f4a51e70afd
2013-04-29 18:44:15 +02:00
Timo Tijhof e150011849 docgen: Disable parallel processing, suspected cause of Ruby segfaults
Change-Id: Icdf92b4c0aed27f7bfc5d37c6abeedf60a2b7f27
2013-04-15 22:32:26 +00:00
Timo Tijhof 8d2ad5b312 Docgen: Add a way to override parameters to makeStaticLoader.
When running from Jenkins, we publish only the docs/ directory.
So the live previews are failing as there is no ../modules to be
found.

This will allow Jenkins to instead pass a different --ve-path.

Also, needed to fix the eval in PHP to not use vePath directly.
The vePath is the path for the web browser to the module directory
not for the server-side.

On the server-side we can just use __DIR__ as maintenance/
is always next to /modules and /VisualEditor.i18n.php.

Change-Id: I02101454a1977938bf861425db2141bdb446725b
2013-03-28 20:31:28 +01:00
Timo Tijhof 36fb75d6b1 Docgen: Re-colourise jsduck warnings.
When jsduck is executed in a subshell (as we do, to catch output)
it disables the color output. It should have a --color flag, but
it doesn't have that, so manually colourise for now.

Change-Id: I1f8da523b6b4fc1fc6965f751395f8af497b13b5
2013-03-28 19:55:25 +01:00
Timo Tijhof 0c33d05e48 Docgen: Exit with error status code if there are warnings.
This way the Jenkins job will be marked failure if we introduce
regressions in the validity of the syntax.

Change-Id: I80ea147b96632412913193600960d1cf4127ed25
2013-03-20 17:45:57 +01:00
Timo Tijhof 012c980931 docgen: Exit with exit code of jsduck command
Change-Id: Idf896dc6d9dcd11effcc9836b857267570db3e15
2013-03-15 17:25:39 +01:00
Timo Tijhof ed9477aa5b docsgen: Fix error on Ubuntu
When running this on Mac, it works fine.
But when running it on Ubuntu in labs, the condition
checking for "VE-LOAD" head and body always evaluate to false.

Not sure what's up with that, but since these lines no longer
contain whitespace, a straight comparison is all we need.

Also removed the duplicate `<head>` tag in the template.

Change-Id: Ic7e8351e784be35fd0104269be331cf9bd0c08b4
2010-01-05 23:27:55 +01:00
Timo Tijhof 62aeb254d9 Implement inline documentation examples.
Refactored the (previously unused) eg-iframe file to be a
template with 2 placeholders for script and styles.

The previous version was just the basic version to execute
javascript code, but that's not good enough since we need a
whole bunch of classes to be loaded.

A bash file processes the template into proper html, with the
help of the makeStaticLoader maintenance script we already had.

Updated demo.css, cleaned up redundant properties restyled
slightly to be more like the Vector skin and less "raw".

Fixed default $IP path in makeStaticLoader.php to work with simple mediawiki core installs having the extension in the
regular extensions directory, and prefixed __DIR__ so it
doesn't rely on the directory you call it from.

Change-Id: Ic789121dfeca08d9db69564d2ad2e52b3fa45de9
2013-02-08 17:47:10 -08:00