GithubHelp home page GithubHelp logo

Comments (6)

marionebl avatar marionebl commented on May 22, 2024 2

I'd vote for keeping bankai opinionated and favor a css-in-js approach. budo for development and plain browserify for building will always be a better fit if one needs full flexibility.

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024 1

if someone wants to use an external stylesheet they can do:

const css = require('sheetify')
css('./my-local-stylesheet.css')

And it'll just work. Marking as resolved and closing

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

currently there's not, but we could totally add one - hyperstream accepts streams as read sources so if we pass in an fs stream of CSS into the internals this could totally work ✨ 🚀

from bankai.

timwis avatar timwis commented on May 22, 2024

From IRC just now:

@timwis: as a means of feedback, it was a little confusing that i had to register the css, then register the js, before i could output/exec either, though i understand it's because of sheetify. seems like the entire premise of having to have state in bankai is because of sheetify.
@yoshuawuyts: that would be correct yeah
ideas on how to improve?
@timwis: well, IMO the audience for something like this is wider than those who've joined the CSS-in-JS club - personally, I just started using it. so i would have expected --css to work more like budo's (pulling in something from the file system) by default. and the sheetify bit would be opt-in
@yoshuawuyts: that's a fair observation. Are you using css in js now tho?
@timwis: any consumers of the sheetify-support feature probably already associate its usage with browserify/js, so perhaps it wouldn't feel too unnatural to them to have the sheetify options as part of the js/browserify options
i am for that enviar (sms) project. i'd be hesitant to use it in a proper work project though (one i expect someone to jump into a year from now and maintain without me) just because it's not mainstream and feels quite unfamiliar at first
for the same reason i don't use a ton of ES6 or other cutting edge features
even with css-in-js though, i often use budo's --css feature to pull in https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
pretty handy for quick development. otherwise i'd have to install sheetify, install bootstrap, and include it in the js
(well, if i'm already using css-in-js, i'd have sheetify installed)
@yoshuawuyts: ah yeah; so the reason why I'm asking is because I def don't - generally try and not add features that I won't use unless someone has a clear use case for them
@timwis: yeah i'm thinking about the choo workshop i was at, introducing people to commonjs, using budo as a shortcut. having to explain how css-in-js works as well is a lot to take in - would be better to learn that on a separate occasion
but certainly worth asking other users/collaborators before making a call like that
@yoshuawuyts: yeah good point. Though on the other hand, having css('bootstrap') is a nice win
"hey, how do we use CSS?" - well, you can import a package from npm like so: (...)
not sure if that would be pushing it though; but maybe it really shifts people into the next gear
reallly not sure. I think you've got a good point haha

Thoughts, other users of bankai? /cc @marionebl

from bankai.

fczuardi avatar fczuardi commented on May 22, 2024

The main usecase is really to use normalize or bootstrap global _.css_ files without having to choose a css-in-js approach at all, just load those files from a cacheable cdn and not embed them in the js bundle.

I have a project that mix rollup (for my modules) with browserify (for 3rd party modules) and sheetify don't get along well with rollup :) <-- this particular case I've workarounded with rollup-plugin-browserify-transform

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

@fczuardi you can do:

const css = require('sheetify')
css('bootstrap')

and you should be good. bankai can then extract it to a separate file for deployment if you like. Cheers!

from bankai.

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.