Download the PHP package punktde/neos-hyphenation without Composer

On this page you can find all versions of the php package punktde/neos-hyphenation. 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 neos-hyphenation

Neos Package for hyphenating text output

This package is licensed under the MIT license, please view the LICENSE file.

Since automatic hyphenation support by browsers can be described as inconsistent at best and might lead to techincally correct but ugly results, this package provides an Eel helper, which can hyphenate text with soft-hyphens (&:shy;) in a consistent and configurable manner. The Eel helper calls a node.js CLI app, which uses the Hypher node module and hyphenation pattern files to do the initial hyphenation. Once a word is hyphenated, the result is cached and the word will be served from the cache instead of calling the node.js app every time it occurs.

Installation

Install the package:

composer require punktde/neos-hyphenation

Install the node.js app and its dependencies:

Please make sure you have node.js (this app is tested on node.js 8.0.0 and newer) and npm installed. Navigate to the Resources/Private/Library directory of this package, where the JavaScript app lives, and install it. Please make sure the index.js file has its executability flag set:

Configure caching in your project:

You might specify a different cache backend and cache lifetime in the Caches.yamlfile. The first page hit will be very slow, but once most of the long words are in the cache, it will be quite performant.

Usage

This package provides the Eel Helper Hyphenation.hyphenateText(string <text>), which takes a string as an argument and returns a hyphenated version of this string.

Configuration options

Minimum word length and padding:

Users can configure a minimum padding at PunktDe:Neos:Hyphenation:minimumPadding:in the Settings.yaml file. This is an offset which is applied from both ends of the word wherein no hyphenation can occur. Adjust this to ensure a nice and consistent look of the text, e.g. avoiding linebreaks after just one syllable which might look a bit silly in long words. To save resources, the Eel Helper will only call hyphenation on words which are at least twice as long as the minimum padding, since only those are eligible for hyphenation in the first place. The default value is 4.

Language/pattern file used for hyphenation:

The pattern file can be specified in the Resources/Private/Library/package.json file or by running npm install --save <pattern file package> in the Resources/Private/Library directory. Furthermore, it needs to be specified in the index.js app in line 4:

Please run npm install in the Library directory afterwards. The default language package is german.


All versions of neos-hyphenation with dependencies

PHP Build Version
Package Version
Requires neos/neos Version *
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 punktde/neos-hyphenation contains the following files

Loading the files please wait ....