Coder Social home page Coder Social logo

Comments (6)

esamattis avatar esamattis commented on September 25, 2024

Define what you mean with "project"? Node module, node app, web app?

from node-hbsfy.

daprahamian avatar daprahamian commented on September 25, 2024

These are meant to be web libraries. Usage involves someone adding multiple tags to the page, and either referencing the libraries directly off of the window or through a shim.

from node-hbsfy.

daprahamian avatar daprahamian commented on September 25, 2024

Sorry for closing this issue earlier, this is still relevant to my workflow. Is there a way to implement what I am trying to do?

from node-hbsfy.

linus-amg avatar linus-amg commented on September 25, 2024

i would also like to know that, i prefer defining some global helpers and then use them within browserify modules, but using the comfort of hbsfy using require to import hbs files :/

from node-hbsfy.

linus-amg avatar linus-amg commented on September 25, 2024

could be answered by #48 thats what i use, i forked and published hsbfy-global where i expose Handlebars to the global scope by doing window.Handlebars = require('hbsfy-global/runtime'); and then the helpers/partials are available in other bundles aswell.

from node-hbsfy.

daprahamian avatar daprahamian commented on September 25, 2024

I was able to finally figure this out. I first changed the hbsfy compiler to be handlebars like so:

var options = {
  compiler: 'require("handlebars")'
};

I then used browserify-shim to make handlebars point to the global handlebars.

from node-hbsfy.

Related Issues (20)

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.