2017 © Pedro Peláez
 

library twig-js

twig.js, flexible, secure, and high-performance templating engine for Javascript

image

forknetwork/twig-js

twig.js, flexible, secure, and high-performance templating engine for Javascript

  • Monday, November 28, 2016
  • by Gadgetdude
  • Repository
  • 1 Watchers
  • 2 Stars
  • 8,729 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 49 Forks
  • 0 Open issues
  • 9 Versions
  • 5 % Grown

The README.md

Twig.js

![Build Badge] ![Scrutinizer Badge], (*1)

Twig.js is a PHP project that compiles Twig templates into executable Javascript for client-side execution. It is not to be confused with Twig.js, which is a pure Javascript implementation of the Twig templating language., (*2)

Twig Compatibility

Compatibility with vanilla PHP Twig is not yet at 100%. If you need your templates to work with both Twig.js and Twig, stick to the supported filters and functions described below., (*3)

Supported Filters

  • abs
  • batch
  • capitalize
  • default
  • e
  • escape
  • first
  • join
  • json_encode
  • keys
  • last
  • length
  • lower
  • merge
  • nl2br
  • raw
  • replace
  • reverse
  • title
  • trim
  • upper
  • url_encode

Supported Functions

  • block
  • include
  • max
  • min
  • random
  • range

Incompatibilities

The following is a list of functionality present in Twig that is not yet available in Twig.js. There are some really easy pickings in these lists for anybody hoping to make a contribution to the project., (*4)

Unsupported Filters

  • convert_encoding
  • date (See pull request #11)
  • date_modify
  • format
  • number_format
  • round
  • slice
  • sort
  • split
  • striptags

Unsupported Functions

  • attribute
  • constant
  • cycle
  • date (See pull request #11)
  • dump
  • parent
  • source
  • template_from_string

Testing

To run the tests, you'll need Composer, Node and NPM on your system., (*5)

$ make test

License

Twig.js is released under the Apache License, Version 2.0., (*6)

The Versions

28/11 2016

dev-master

9999999-dev

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Rolf Babijn

templating

16/11 2016

v2.0.2

2.0.2.0

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Rolf Babijn

templating

14/11 2016

v2.0.1

2.0.1.0

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating

11/11 2016

v2.0.0

2.0.0.0

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating

21/03 2016

dev-forcompilerbug

dev-forcompilerbug

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating

09/05 2015

1.0.2

1.0.2.0

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating

09/10 2014

dev-issue86

dev-issue86

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating

05/09 2014

1.0.1

1.0.1.0

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating

23/06 2014

1.0.0

1.0.0.0

twig.js, flexible, secure, and high-performance templating engine for Javascript

  Sources   Download

Apache2

The Requires

 

The Development Requires

templating