Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

final-web

0.1.3 • Public • Published

Final-Web

Compile organized XML files into PHP.

Basic Example

Create a source/example.web file inside a source folder:

<page>
    <set $name="Example" />
    <settings>
        <title>{$name} Title</title>
    </settings>
    <header>{$name} Header</header>
    <paragraph>This is a paragraph with a
        <link to="page">link</link>.
    </paragraph>
</page>

Install Final-Web with NPM npm install final-web -g.

Run the compiler "final source-folder destination-folder" from the parent directory of the source folder.

Final outputs the following output/example.php:

<!DOCTYPE html>
<html>
    <?php $name = "Example"; ?>
    <head>
        <title><?php print($name); ?> Title</title>
    </head>
    <body class="page">
        <h1 class="header"><?php print($name); ?> Header</h1>
        <p class="paragraph">This is a paragraph with a
            <a href="page.php" class="link">link</a>.
        </p>
    </body>
</html>

Which renders in the browser:

Example Title

This is a paragraph with a link.

Install

npm i final-web

DownloadsWeekly Downloads

2

Version

0.1.3

License

ISC

Unpacked Size

24.9 kB

Total Files

7

Last publish

Collaborators

  • avatar