Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Compiling Question #1208

Closed
lostthetrail opened this issue Apr 7, 2016 · 2 comments
Closed

CLI Compiling Question #1208

lostthetrail opened this issue Apr 7, 2016 · 2 comments

Comments

@lostthetrail
Copy link

When using the CLI it appears you have to create an output file per specific template or templates in a folder. It doesn't appear that there is a way to have the CLI process the whole tree of dependencies in a template.

Is it the intention to need to run the CLI at least one time for partials? If not once per partial?

Furthermore, partials once registered seem to be aliased to their filename, any suggestions on namespacing?

Thank you so much for your time.

File structure

<< root >>
↳ templates/
↳ main.hbs
↳ partials/
┋ ↳ item.hbs

main.hbs

<h1>My page</h1>
{{> item}}

item.hbs

<p>An item</p>
@jbboehr
Copy link
Contributor

jbboehr commented Apr 19, 2016

If you're using requirejs, this library can load partials. The precompilation step is done through the requirejs optimizer, so you don't have to precompile manually.

@methodbox
Copy link

A lot of people have examples out there for gulp/grunt to recompile on change when watching specific files or contents of a given folder(s).

Takes about a minute to setup and will both compile all or specific items on any save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants