Comments (12)
Another option is to fix the one line from the source. :) I'd still prefer to run with a live time formatting library rather than something that's MIA.
from handlebars-helpers.
I trust your judgement, do you recommend moment.js over other libs? Also, we can implement a new helper like {{time ""}}
or {{moment ""}}
and just deprecate the formatDate helper and related code until we feel pretty good about removing it. What do you think? Any interest in implementing the change?
from handlebars-helpers.
I think {{moment}}
would be better as then people might realize that they can use moment.js documentation http://momentjs.com/ to see what's possible.
One thing tho, I'm not at ease with coffeescript. Could I do it in javascript and then we could see if we'll convert it to coffeescript with some tool or at all?
from handlebars-helpers.
Absolutely, javascript is great, the coffeescript might get thrown out anyway - I don't like it either, so no worries at all.
I guess it's an overstatement to say I don't like it. In fact, I think coffeescript is great for configuration, like as an alternative to YAML. But besides that, I don't like it. I think it would be really interesting to see "coffee front matter", because it would allow configuration that is very similar to YAML, but it would be far more powerful
from handlebars-helpers.
btw, thought you might be interested in this: https://github.com/jonschlinkert/sublime-markdown-extended. The images on the readme are actually from the Issues on that repo. I copied each image into an issue, then I copied the generated markdown link into the readme lol. Pretty interesting that it works!
from handlebars-helpers.
Something like?
https://github.com/Arkkimaagi/assemble-handlebars-momentjs
It does not have to be in it's own repository, but I decided to try building one quickly.
Thanks, I'll take a look at sublime-markdown-extended, is it in package manager?
from handlebars-helpers.
Btw, I feel almost ashamed how simple it was to build the script, it took way longer to document what one can do with it.
from handlebars-helpers.
Lol, yeah the documentation seems to always take longer. It's not structured and doesn't follow a pattern like code, and you have to think about what other people might need to know.
That's a great helper, thanks I will add a link to it in the docs. I think "assemble-helpers-momentjs" would probably make more sense. Technically the code could be generalized more later so that it could be used as either a handlebars helper, lodash mixin or as a filter with a different template language. Of course none of this matters unless you actually need something other than handlebars, so I'm just thinking out loud.
A few thoughts (I'm happy to create pull requests for some of these if you want):
- Make sure you add a "main" property to the package.json with the path to the helper. Consider adding a bower.json for easy downloading and consumption of the helper.
- consider putting the helper in the root of the project, and just add a test folder to demonstrate the helper. This will make it easy to consume via a method other than npm. Especially with bower.
- Preferably name the helper something like "helper-momentjs.js". I will document this, but all helpers have been following the pattern "helper-*.js" so that they can easily be included via simple minimatch patterns.
Now with a convention for helpers it will be fast and easy to create them going forward... Hmmm, I'm going to create a grunt init package for this today. That will be nice, so everything I mentioned above will be included.
from handlebars-helpers.
I'll reformat the thing to work nicely, and yes a sample project on how to add this would be nice to get it rolling.
I'm ok for this code to be part of the helper-lib if you wish. I just did it as a separate repo to see if I could. :)
from handlebars-helpers.
I just added a page to the docs here: http://assemble.io/docs/Custom-Helpers.html
I'll clean it up over time, I'm adding an init project now, and an example repo.
from handlebars-helpers.
Also see this issue (created with you in mind ;-) #32
from handlebars-helpers.
Done https://github.com/jonschlinkert/grunt-init-assemble-helper
from handlebars-helpers.
Related Issues (20)
- Comparation(#compare var1 "==" var2) with two variables doesn't work HOT 1
- Upgrade for new versions of the related plugins HOT 1
- does not export a 'register' function, cannot import HOT 1
- Create SECURITY.md
- Not splitting string by line breaks '\n' HOT 1
- todo: merge updates from https://github.com/Budibase/handlebars-helpers HOT 3
- Markdown Helper is broken...
- Vulnerability found (due to highlight.js) HOT 3
- isLast in nested forEach
- Titleize handlebar doesn't titleize input string correctly.
- Request: encode to hex HOT 1
- If loading all helpers the String helper reverse overrides the Array helper reverse. HOT 2
- An examples of working out averages on columns
- Handle empty fields
- String helper `split` doesn't split by empty string.
- This package does not install
- Fumanchu - A supported Handlebar + Handlebars-Helpers together! HOT 4
- query online
- Dead? Process to transfer ownership?
- Dependency "ent" uses deprecated Node punycode module
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 handlebars-helpers.