@sadephp/sade

1.0.0-alpha • Public • Published

Sade

Build Status

Work in progress!

Sade, a library for creating PHP Components with Twig (2.x). This package will not do any preprocessing or somthing like that.

Documentation

The documentation is located here

Example

<template>
    <p>{{ greeting }} World!</p>
</template>

<style scoped>
    p {
        font-size: 2em;
        text-align: center;
    }
</style>

<?php
    return [
        'data' => function() {
            return [
                'greeting' => 'Hello'
            ];
        }
    ];
?>

To render

$sade = new \Sade\Sade(__DIR__ . '/examples');

echo $sade->render('greeting.php');

License

MIT © Fredrik Forsmo

Package Sidebar

Install

npm i @sadephp/sade

Weekly Downloads

2

Version

1.0.0-alpha

License

MIT

Unpacked Size

1.65 MB

Total Files

537

Last publish

Collaborators

  • frozzare