Comments (6)
Define what you mean with "project"? Node module, node app, web app?
from node-hbsfy.
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.
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.
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.
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.
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)
- Show original markup in source map HOT 3
- Errors on comments HOT 4
- comiling templates in the node_modules folder HOT 2
- Doesn't work with handlebars installed locally HOT 1
- example use-cases of hbsfy HOT 4
- Upgrade version of handlebars HOT 10
- way to use helpers from another bundle inside another bundle? HOT 1
- peerDep HOT 2
- `ParseError: Unexpected end of input` no matter what 😭 HOT 2
- use global Handlebars HOT 2
- Require hook (server side node). HOT 1
- installs binaries to node_modules instead of node_modules/.bin HOT 2
- hbsfy with --traverse fails with inline partials HOT 12
- Hbsfy fails to use aliases while using --traverse HOT 8
- Using helpers through command-line HOT 3
- Babel plugin HOT 1
- Error: You specified knownHelpersOnly, but used the unknown helper HOT 2
- Quick Templates – compile from string HOT 1
- honor Browserify "paths" when resolving partials? HOT 3
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 node-hbsfy.