tsugi / lib
The PHP Library to build interoperable learning tools
Installs: 1 873
Dependents: 3
Suggesters: 0
Security: 0
Stars: 8
Watchers: 5
Forks: 26
Open Issues: 11
Requires
- php: >=8.2.0
- ezyang/htmlpurifier: >=4.14.0
- firebase/php-jwt: >=6.3.2
- laravel/lumen-framework: >=8.0.0
Requires (Dev)
- phpunit/php-timer: v5.0.3
- phpunit/phpunit: 9.*
This package is auto-updated.
Last update: 2024-12-18 02:05:52 UTC
README
This is part of the Tsugi PHP Project and contains the run-time objects and scripts that support PHP Tsugi applications and modules.
Here is some documentation for the APIs that are provided by this library:
In addition to being used as part of the base Tsugi installs, Tsugi standalone application or modules will generally pull this in as a Packagist dependency using Composer.
For samples of how to use this code in a standalone library or an application, please see the following repositories:
-
Sample Tsugi Module - Copy this if you want to start a fresh Tsugi Module from scratch. If you are building a new tool from scratch, you should build it as a "Tsugi Module" following all of the Tsugi style guidance, using the Tsugi browser environment, and making full use of the Tsugi framework. This repository contains a basic "Tsugi Module" you can use as a starting point.
-
Sample Tsugi-Enabled Application - You can also use Tsugi as a library and add it to a few places in an existing application. This repository contains sample code showing how to use Tsugi as a library in an existing application.
Unit Testing
To download PHPUnit (and any other development dependencies):
composer install
To test:
./vendor/bin/phpunit tests --bootstrap vendor/autoload.php
To run one test:
vendor/bin/phpunit --filter {EntryTest}
Pulling in to Tsugi
Edit composer.json
and
composer update --prefer-dist tsugi/lib
Releasing
This is stored in Packagist.
https://packagist.org/packages/tsugi/lib
Making PHPDoc
Read this:
https://github.com/FriendsOfPHP/Sami
Curl this:
curl -O http://get.sensiolabs.org/sami.phar
Run this:
rm -r /tmp/tsugi/
php sami.phar update sami-config-dist.php
mv /tmp/tsugi/sami.js /tmp/tsugi/s.js
sed 's/".html"/"index.html"/' < /tmp/tsugi/s.js > /tmp/tsugi/sami.js
rm /tmp/tsugi/s.js
open /tmp/tsugi/index.html