Closed mulderp closed 10 years ago
nice catch @mulderp, I'll probably just add a generator for helpers since that seems to be a common need...
it was working already with the previous merge. maybe something got removed by accident?
good to know, lots have things have been shuffled around recently so that's likely the case(and i wasn't aware, crap)
@mulderp I looked into this
I believe the intent was to merge all helpers into one file, thereby removing the need for a generator... I have no comment on whether this was a good or bad idea(seems fine). Regardless, thanks for spotting it, I will update the README
For reference, the helpers generator was removed in #30, specifically, the removed changes are here https://github.com/walmartlabs/generator-thorax/commit/863d0f403ab3e5920e1b93a3acf30a5681f8253e#commitcomment-4696274
@eastridge was this intentional? I think it was, but perhaps the original intent of #30 was to remove cognitive load when making a new app but perhaps(?) not remove ability to generate new helper files... Adding it back in would require helpers live in their own directory...(cause where would they go when generated).
@mulderp fell free to express your thoughts as well, we welcome the open discussion. Did you use the helper generator and did you find it's use beneficial? (cause if so, maybe we should re-consider the removal of it)
I am closing this for now, but feel free to re-open it if further discussion is of interest
My original problem was that the helper did not work as expected, and there was no file yet.
Well, it's not critical, as long as there is a place where to put the helpers. A global "application" like helper would be fine for me, and could come out of the box.
@mulderp check out this file(pre-generated form) which now comes with new apps. Does this solve the problem? Also make sure to require it in the array of files within js/main.js (doesn't need to be injected into function though)
https://github.com/walmartlabs/generator-thorax/blob/master/app/templates/seed/js/helpers.js
A small observation, the command from the README:
results into
also, the help from the generator:
looks empty. Maybe the functions from the generator could be included there too?