Comments (4)
I think the answer is no, as explained here:
the .INCLUDE directive is a 'compile-time' feature, but the % directive is a runtime feature
from bash-tpl.
Hi @tmm1 you figured it out yes the issue is compiletime vs runtime.
You might also have a read here where the user uses bash-tpl as a static site generator tool.
I came up with a strategy (and a makefile) to host a directory of bash-tpl templates that all compile to a directory of .sh/source scripts and you include them using the source
at runtime.
See if anything there might be useful and lemme know your thoughts!
Thanks for taking the time to report an issue and for your interest in my project!
-TW
from bash-tpl.
Hey @tmm1 just checking in to see if you got my reply - lemme know if you wanna continue the discussion !
from bash-tpl.
Hi @tmm1 I'm going to close this issue, but wanted to add one last comment.
I moved the Makefile example mentioned earlier into the Discussion area:
You can use a source path/to/file
in your statement block to include a file at runtime. In the case for a template you would be sourcing the compiled template.
I am working on an idea to add a .SOURCE directive for sourcing other compiled templates that could easily send the current line indent information along so that output generated from the sourced template would be consistent.
Thanks again for your interest in my project and taking the time to report an issue.
-TW
from bash-tpl.
Related Issues (9)
- bash-tpl requires Bash >= 5.1
- Add pp to similar tools HOT 1
- Allow variable with `.tpl` file path as argument to `.INCLUDE` directive HOT 9
- a conditional .INCLUDE throws error when file does not exist HOT 4
- bash-tpl is in my bash compiler HOT 2
- Feature request: pass format to printf HOT 3
- Namespace the functions and change name of main to bash-tpl or btpl HOT 4
- Generated dollar-quote escape sequences are Bash-specific (in practice) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bash-tpl.