These are the scripts to generate the website on http://modules.perl6.org/
Please use the following steps to aid you in your development:
Create a token with access to public repositories. To run the scripts, you need a GitHub token with rights to query Perl 6 module GitHub repository information.
Save the token in file named
Install prerequisites for build script:
$ perl Build.PL $ ./Build installdeps
- Run build script
$ perl bin/build-project-list.pl --limit=<number-of-modules>
You can also create file
META.list.local that contains specific URLs
you may wish to fetch for debug purposes. Use the
to specify the location of that file. See
--help for all options.
- The build script can start the Mojolicious app that powers the
front end of you pass the
$ perl bin/build-project-list.pl --restart-app
For development purposes, you can use
bin/morbo to power the web app,
as it will watch for changes and auto-restart the app.
Changes to database
The build script uses a caching mechanism that avoids fetching extra
info for a distro if no commits to it were made. If you made a change
that needs to update database information for all dists, include string
[REBUILD] (including the brackets) as the first thing in your commit
message title. That will clear the cache and cause full rebuild.
If you made a change to the structure of the database, specify
as the first thing in the commit's title, to re-deploy site's database.
When testing locally, you can just delete existing database file
(the tables will be created by deploy from DBIC automatically).
We support the current and previous major releases of Chrome, Firefox, Internet Explorer (Edge), and Safari. Please test layout changes. Lacking actual browsers to test in, you can use browsershots.org or browserstack.com.
This is the app that reads the database generated by the
build-project-list.pl script and displays web pages.
Seeing your changes
Once committed, the production cron job will pick up your changes on the 20th and 50th minutes of every hour. The script can take up to 10 minutes to complete.
20,50 * * * * sh update-modules.perl6.org > log/update.log 2>&1; cp log/update.log /var/www/modules.perl6.org/public/update.log
The cron job results can be found here.
If you only made changes to the web app, you can get them live a bit faster
[REAPP] as first thing in commit message title (including brackets),
which will cause the updater to restart the app after pulling and before
rebuilding the db (which takes ~1.5hr)
Note About Cache
Certain data is cached by the site and is only updated when some event
(like new commits to the dist's repo) happens. This includes travis statuses,
logotypes, and Koality metrics. If your changes require doing so, you can
trigger a full rebuild of the database and refresh of caches by including
[REBUILD] as part of the title of your commit message.
If you are adding a feature that caches something, it needs to watch for
FULL_REBUILD environmental variable and refresh the caches if that variable
is set to a true value.
Intial version contributed by patrickas++ on #perl6
See LICENSE file for the details of the license of the code in this repository.
This repository also contains code authored by third parties that may be licensed under a different license. Such files indicate the copyright and license terms at the top of the file. Currently these include:
- Sprite generation code modified from now-deprecated original
Mojolicious::Plugin::AssetPack::Handler::SpritesCopyright (C) 2014 Jan Henning Thorsen
- jQuery deparam plugin: Copyright (c) 2010 "Cowboy" Ben Alman. Dual licensed under the MIT and GPL licenses. See http://benalman.com/about/license/
- The Camelia image is copyright 2009 by Larry Wall. Permission to use is granted under the Artistic License 2.0, or any subsequent version of the Artistic License.
- GitHub Octocat logo is an exclusive trademark registered in the United States by GitHub, Inc and is used with permission. See https://github.com/logos for details
- A portion of CPAN Perl 6 dist meta fetcher code was reused. Original by Nick Logan, from github.com/ugexe/Perl6-App--ecogen