Giter VIP home page Giter VIP logo

handlebars's Introduction

Clay

Clay is an open-source CMS created by New York Media powering New York Magazine, Vulture, The Cut, Grub Street and Slate.

Clay is comprised of modules available on npm, but the core system is comprised of Kiln, the editing interface, and Amphora, the REST API. For more information on the two modules please see documentation on each. The documentation in this space is meant to explain core concepts of Clay, but for a deeper technical dive you can explore the documentation for each of the modules themselves.

handlebars's People

Contributors

allysonyoung avatar amycheng avatar ashwu avatar byronhulcher avatar cperryk avatar cruzanmo avatar davidandrewfrey avatar dependabot[bot] avatar fraddski avatar james-owen avatar jasondecastro avatar jonwinton avatar jpope19 avatar kerenlerner avatar nelsonpecora avatar rmfarrell avatar scottnash avatar terrineal avatar victhevenot avatar zonika avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

handlebars's Issues

allow es2015 module syntax in helpers

We'd like to use include and export in helpers, but the readme generator cannot handle es2015 modules. Update the generator (or find some way to precompile them on the fly) to handle this.

Note: Make sure the JSDoc parser can understand comments on the export default function

Ad Dummies

Should this be in the NYMag Handlebars repo?

What's the timeline on the fix?

ALL conditional helpers can be inline

Only some of the conditional helpers (if, compare, module) are inline.

It would be more consistent if the rest of the helpers (ifAny, ifAll, ifNone, unlessAll) had an option to be used inline, too.

Clay Handlebars uses the Root Handlebars Environment

Setup

In your package json have two different packages which both depend on clayhandlebars (for example amphora-html and amphora-amp) and within each of those packages have something like the following:

var clayhandlebars = require('clayhandlebars'),
  hbsEnvironment = clayhandlebars();

Expected Result

The two packages should have non-conflicting hbsEnvironments, i.e that hbsEnvironment in both packages should be a separate Handlebars environment

Actual Result

Both packages have the same hsbEnvironment meaning they can potentially conflict when defining partials or helpers. I believe this is due to the fact that clayhandlebars will define the environment by just requiring the handlebars package (which will get cached by require). This causes an issue if the two packages intend to add partials of the same name

Possible Resolution

One possible resolution I think would be to make a slight modification to the way the environment is created. In the initialization method change the handlebars initialization to use create so that it always produces a no-conflict handlebars environment to use.

migrate from moment to date-fns

date-fns is a moment-like library that gives us more modularity and a smaller bundle size:

  • ability to require individual functions, similar to lodash v3+
  • no need for webpack localization hacks
  • equivalent api for the things we use moment for

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.