Skip to content

Raku/modules.raku.org

 
 

Repository files navigation

modules.raku.org

These are the scripts to generate the website on http://modules.raku.org/

TODOs

Want to help out? Check if any open Issues exist that you might be able to solve. We also have a list of TODO ideas you might be interested in.

Development

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 github-token

  • 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 --meta-list argument 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 --restart-app option:
    $ 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 [NEWDB] 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).

Browser Support

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.

Front-End App

This is the app that reads the database generated by the build-project-list.pl script and displays web pages. See DEPLOYMENT.md

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.raku.org > log/update.log 2>&1; cp log/update.log /var/www/modules.raku.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 by using [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.

Author

Intial version contributed by patrickas++ on #perl6

LICENSE

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:

Releases

No releases published

Packages

No packages published

Languages

  • Perl 78.0%
  • JavaScript 11.4%
  • SCSS 6.8%
  • Raku 2.6%
  • Shell 1.2%