Re: [flask] Flask & Bower
- Viktor Evdokimov
- 2013-11-20 @ 18:19
First of all, I guess we need to distinguish two very different scenarios
that I feel you just mixing together.
Lets first talk about production environment. I believe you better use
some CI server like jenkins/teamcity etc which is aware of version
control, python specific deployment and in our case bower as well. so it
is CI server task to minimize/compile coffeescript/js/less/sass/stylus/bem
or any other source files you have in your repository. It’s up to you to
setup such a tasks using bower or not. As it is production environment,
you are going to have your artifact ( i.e. entire flask project with final
compiled and minimized front end files) ready for deployment, so there is
no place for live-reload and alike (COLT etc).
In development environment you most likely running bower update when you
need it, and you can setup range of tools to minimize/compile your source
files once they are changed. Live-reload plugins will do live-reload in
browser on your development machine.
If I misunderstood what you are asking, please elaborate.
On Wednesday, November 20, 2013 at 11:38 AM, Nathan Farrar wrote:
> Thanks. I want to preface this with the tools I'm working with and the
front-end stuff is completely new to me. I'm trying to learn modern/best
practices for the front-end gunk.
> When I install things with bower, they are sometimes already minimized
and ready for production, however sometimes they are not minimized (and
need to be), or they include CoffeeScript/LESS/SASS files that need to be
automatically install into bower_components in the directory I've
> So for some packages, they can go directly into the static folder - but
some packages need to go somewhere else, and then be built. I've got some
ideas how to do all this, but what I'm looking for is some kind of idea if
there is an established workflow or set of best practices that work
through some sort of workflow that would include how to structure the
application, using bower to install production ready components, using
bower to install components that need to be compiled into a production
ready state, using grunt with flask to automate compiling of
CoffeeScript/LESS/SASS in the context of Flask Applications, using guard
to monitor the flask application for changes and automatically reloading
the site with live-reload.
> Sorry, that's a lot more than just bower - and there are bits and pieces
of all this information all over that I'm assimilating and working
through, was just wondering if someone has already figured all this stuff
out and written up an established workflow/best practices.
> Nathan Farrar
> On 11/20/2013 8:46 AM, Viktor Evdokimov wrote:
> > Since your front end assets are going to be in dedicated folder, say
*static*, you can just manage content of this folder with bower, keeping
flask totally unaware of it.
> > IMHO that’s best approach.
> > --
> > Best,
> > ᏛᎧ
> > On Wednesday, November 20, 2013 at 10:07 AM, Nathan Farrar wrote:
> > > Is anyone using bower to manage their front end assets and dependencies
> > > with flask applications? If so, are there any guides out there that can
> > > help me get started? I've been scouring the web, but haven't found
> > > anything.
> > >
> > >
> > >