1.0.10 • Published 9 years ago

flexy-to-twig v1.0.10

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

Flexy to Twig converter

This tool converts X-Cart 5 Flexy templates (original version is found on PEAR) to the Twig syntax.

Installation:

The recommended way is to install globally via:

npm install -g flexy-to-twig

Or install locally:

npm install flexy-to-twig

(in that case you will need to either run converter as ./node_modules/.bin/flexy-to-twig or somehow alter your PATH)

Usage:

flexy-to-twig example.tpl

The above command will print generated twig template contents to stdout. Redirect stdout to file to actually create a twig template file:

flexy-to-twig example.tpl > example.twig

To recursively convert all files starting from the skins subdirectory:

find skins/ -name '*.tpl' -exec bash -c 'file="{}" ; flexy-to-twig "{}" > ${file%.tpl}.twig' -- {}  \;

Instructions to modify & build:

The converter is based on Jison parser generator, the build process is automated with gulp. Install the npm dependencies and run gulp:

npm install
gulp

The source file for the flexy grammar is bundled with AST converter in flexy-to-twig.jison

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago