Wednesday, 7 August 2013

How to create cms templates from HTML files via GruntJS?

How to create cms templates from HTML files via GruntJS?

In my webdesign process i use jade, sass, coffe etc. to generate static
files via a GruntJS watch task into a dev folder. And most of the times
after the build process is done, a cms comes along and want some templates
to work. Thats usually html files with some php/ruby/python tags in it.
Let´s say it´s a Wordpress Theme.
The Problem is:
i have to modify my generated files in the dev folder directly
when im modifing my source jade, html, coffee - files, the dev folder
would be overwritten
if i clone the static files and move them into the theme folder, i have to
apply manually every change i made to the src/dev folder to the cloned
theme template files.
that´s very odd. So i´am in need of a grunt task that maybe...
generate the templates for me out of the static files (via a json mapping
file)
generate the templates directly from the src files via special attributes,
comments or something similar
There´s just one thread i found where the user tries to accomplish the
same with jsdom. Can someone help me to find a existing tool that
accomplish such a task or do i have to build it on my own?
Thanks, Robert

No comments:

Post a Comment