codyhouse / codyhouse-framework

A lightweight front-end framework for building accessible, bespoke interfaces.
https://codyhouse.co/
MIT License
1.16k stars 173 forks source link

It would be better combine with handlebars.js #52

Closed tinybug closed 4 years ago

tinybug commented 4 years ago

codyhouse framework is really great framework for static website ~

But it would be better combine with handlebars.js for html components. For example, the header component can just write once and then use in multi pages.

Will you consider this plan?

tinybug commented 4 years ago

This https://github.com/tinybug/codyhouse-framework/commit/b33ade66fbcd4fe0ed3e01160c3d8330bb9a8aae is what I changed, please check it out. simpily run:

# install package
yarn 

# for dev
yarn start

# for build
yarn build
sebastiano-guerriero commented 4 years ago

Hi there! That's a good point! I agree that providing a version of the components that is more "component-friendly" in terms of reusability would be beneficial to all our users. I'm not sure handlebar.js would be the best solution though. At the moment, we're experimenting with native web components, that come with many advantages (they're native; they should work fine with libraries like Vue/React.js). We'll keep looking into this 👍

tinybug commented 4 years ago

handlebar.js can be written in vanilla html,it's easier than Vue/React.js for those people who don't know a lot develop tech and I think handlebar.js is more suitable for static website. (I had not used native web components, so I have no opinion on it).

sebastiano-guerriero commented 4 years ago

That's definitely an option we'll consider. Before committing to a decision that means for us updating hundreds of components, we'll get in touch with the community (e.g., a poll), and see what the majority prefers. Cheers

sanzwebdevelopment commented 4 years ago

Not sure about handlebars.js however I'm currently looking at whether it might be useful to build each component with Stencil. I currently use Ionic (the Angular flavour) which uses Stencil for it's components.

Just a thought :-)

tinybug commented 4 years ago

I think vuejs/reactjs(not sure stencil), they are not simple, they need the new language gramer, jsx stuff, the build scripts and they difficult in static website, even there is nextjs for building static website. they are too much. In handlerbars, it just simpily combines the vanilla html code, just need to write a few lines of build scripts in gulpfile, and the components of codyhouse still can simpily copy the html code, don't need to change at all. I love codyhouse beacause it's simple, vanilla html, vanilla js, and scss is simple enough, it can be simpily copy to anywhere. And I pay for codyhouse pro version is becuase of this too, if the components change to vuejs or reactjs, I will not pay for it. :-) (not native english speaker, sorry for the poor gramer😂)

sebastiano-guerriero commented 4 years ago

We will never remove the vanilla HTML, CSS, JS versions :) I agree that they're great for building static websites, and they work seamlessly with termplating languages like handlebar.js. If we integrate a new version of the components (react, vue, stencil or native web components), it will be an additional version, not a replacement of the current components.

sebastiano-guerriero commented 4 years ago

I'm closing this issue because we've gathered some interesting info, but I don't think we can add more to this conversation. Thanks for the feedback!