SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

Feature request: Build entire folder #90

Open Dzivo opened 5 years ago

Dzivo commented 5 years ago

Ability to build whole folder of haml files:

Syntax sugestion --folder -f --output -o

heml build -f Template -o Output

Root ├───Output └───Templates

Command triggered in Root

pkleskovic commented 5 years ago

This would be a good idea

michaelbrazell commented 4 years ago

I had a similar request and handled this with a bash script. Doesn't solve your problem, but in lieu of this project not getting any active development, hoping this helps:

heml_build_directory.sh

for file in src/your_directory/*.heml
do
  heml build "$file"
done

run ./heml_build_directory.sh in your console.

It's not perfect but it goes through the directory you specify and finds each .heml file, and runs a basic build command. You can change the command how you need it. You could add a mv command after to move them to a specific output directory as well.