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

Absent filenames after pipe with gulp-handlebars #91

Closed
satfx opened this issue Jan 21, 2018 · 3 comments
Closed

Absent filenames after pipe with gulp-handlebars #91

satfx opened this issue Jan 21, 2018 · 3 comments

Comments

@satfx
Copy link

satfx commented Jan 21, 2018

I'm trying to use this package, but faced with strange issue when using v5.0.1 on Windows 10 with Visual Studio (at least with 2015 Pro version). Btw, it is all fine with version <= 5.0.0 on Win10, and with any version on Win7.

As a template precompile task, I'm using exactly the same code what was published as an "partials" example. And when I use it with environment described above, I get a result with no template name. For example,

Handlebars.registerPartial("", Handlebars.template(...))
instead of
Handlebars.registerPartial("Currency", Handlebars.template(...))
for partials

and

this["App"]["templates"] = Handlebars.template(...)
instead of
this["App"]["templates"]["JelectCheckboxOption"] = Handlebars.template(...)
for templates.

When adding
.pipe(print(function (v) { console.log(JSON.stringify(v)); }))
just after
.pipe(handlebars())
I see logged paths without filenames on Win10 with v5.0.1 ("print" is gulp-print package). When making all the same on different gulp-handlebars versions and/or Win OS versions, I can clearly see paths with filenames.

Don't know if it helps, but when calling
.on("data", function (v) { console.log(JSON.stringify(v)); })
just after
.pipe(handlebars())
the only difference is in absence of extname property and in contents of history property:

Win7
{
"history":["C:\Projects\TestProject\templates\_Currency.hbs"],
"extname":".js",
...
}

Win10
{
"history":["C:\Projects\TestProject\templates\_Currency.hbs","C:\Projects\TestProject\templates\"],
...
}

@c4rbon-c0py
Copy link

Also experienced this problem. Had to revert back to 5.0.0.

@lazd
Copy link
Owner

lazd commented Feb 12, 2018

A fix has been released as 5.0.2, @c4rbon-c0py @satfx can you please test?

@c4rbon-c0py
Copy link

@lazd Just updated. Everything seems tip-top. I'll report back if I notice anything.

Thanks for the fix!

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