Create static html files from Component.io components.
Currently WIP
- Create a new project and associated components on https://component.io
- Create a
tplfolder in the working directory - Add in your templates with the extension
.html.php, each template will be processed and the output written to thedestfolder with the.phpextension removed - Create a
destfolder in the working directory - Run
php component.phpor HTTPPOSTto it if running on a web server
$project the project id, $component is the component id.
NOTE: At the moment you can only use components from one project.
The resulting object will have the properties of the component
<?php
$thing = \Component\ComponentCls('cio-library', 'errba');
echo $thing->content;Works the same as the official one, see https://guide.component.io/v1/api/index.html#Component-buildImage-image-options