Download the PHP package r-odriguez/tusk without Composer

On this page you can find all versions of the php package r-odriguez/tusk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tusk

Tusk

A simple opinionated web library to be used alongside nginx or apache.

Installation

How to use it

Using tusk-init script

Create your project folder, open it in your terminal and run tusk-init on it.

Setting up from scratch

Create a public folder with your index.php there and just require it:

It ~is~ isn't necessary (anymore) to have a config.php so tusk knows where to look for things. Usually you would define where tusk should look for special global variables, like COMPONENTS_DIR_NAME, which tells tusk the name of the folder that has server components for a route. This is every global variable defined by tusk and you can change it by define()ing inside a config.php in the root folder:

Variables Value Description
WEB_DIR "src/www" Directory containing web pages
COMPONENTS_DIR_NAME "partials" Directory name for reusable components based on the route
GLOBALS_DIR "src/globals" Directory for global components
ICONS_DIR "public/svg/icons" Directory containing icon SVG files
SVG_DIR "public/svg" Directory containing general SVG files
ERROR_PAGES_DIR "src/www/errors" Directory containing error pages

Local Development

For development I like to use php built-in web server. Create a Makefile at the top level with the following:

You'll probably need a .env file with the following too:

Index.php example

You can use a Route class to define the paths.

You can access :name(word) variable using route->param("name") function inside the controller. There are two options of creating a route: 1. the second parameter of Route->path() is a directory inside the WEB_DIR where there is a main.php and a view.php or 2. is a php file. If you choose the first option, use the tusk\view() function to return the view inside the view.php.

Explore the code base

If you want to know more about the library, explore the code base, is super simple. This is basically a compilation of useful functions to deal with annoyances of vanilla php.

Contributing

I don't plan on supporting this more than what I need. If you have something to add up, try your luck, I might not answer it. If I like it I'll accept probably. I accept bug reports tho.

Fixes


All versions of tusk with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package r-odriguez/tusk contains the following files

Loading the files please wait ....