Download the PHP package ekowabaka/tico-v without Composer

On this page you can find all versions of the php package ekowabaka/tico-v. 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 tico-v

TiCo-v

tiCo-v provides a lightweight solution for templating and one-way data-binding in JavaScript. Built on top of ES6 proxies, tiCo-v provides a very thin layer of code that relies exclusively on proxy traps to update DOM elements when bound objects are updated.

Installation

tiCo-v has no dependencies and is quite easy to install. Currently, the only supported package managers are npm and composer. If you do not use any of these, you can always download the current version of the script and use it directly as you desire.

For npm ...

npm install tico-v

For composer ...

composer require ekowabaka/tico-v

You might also consider direct inclusion as follows

`

Writing Templates

Templates for tiCo-v are written directly into the HTML markup of your the page. Variables to be replaced by later bindings are written with the mustache/handlebars style variable placeholder (and that's where any similarities with those end). In fact, the feature set of tiCo-v is so small it call be summarised with one example.

`

Text Substitutions

Text substitutions are primarily performed with the ? operator. This operator can operate in a coalescing or tenary mode, depending on the syntax. From the example, we should see that text substitutions are performed with variables specified in curly braces (e.g. {{variable}}). Any HTML content in these variables is automatically escaped for safety.

If you need to render raw HTML content, you can use triple curly braces: {{{variable}}}. This will parse the string into DOM nodes and insert them safely into the document.

Conditional substitution can be made with the "?" operator, which acts as some form of truthy coalescing. So, {{variable1 ? variable2}} implies the value of variable1 will be displayed if it is truthy instead of the value of variable2, which will displayed irrespective of its value.

Conditional substitutions can also involve literal text such as {{truth ? "when true" : "when false"}}. In this case, the text when true is substituted if the variable truth is truthy and when false is displayed when it's false. For literal substitutions, the second literal to be displayed on a false value can be omitted and it's automatically replaced with an empty string.

Special tv attributes

Prefixing any attribute with tv-value- causes that attribute to be later added with its value parsed for text substitutions. For example adding the attribute tv-value-src='{{avater_img?"default-avatar.png"}}' to an img tag will cause tiCo-v to add an src attribute whose value is based on the evaluation of the substitution {{avater_img?"default-avatar.png"}}.

You can hide and show DOM nodes using the tv-true and tv-not-true attributes. A DOM node with the tv-true attribute will be visible if the variable represented by the value of the attribute is truthy. Likewise, a DOM node with tv-not-true will be visible only when the value of the variable is false.

The tv-foreach attribute helps with repeating nodes.

Binding Variables

To bind an object to a template such as the one above, you can use:

`

And that's it!


All versions of tico-v 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 ekowabaka/tico-v contains the following files

Loading the files please wait ...