Hey Roger. Here's how I've done it in the past:
- Create a Django app in your project to hold your static files and
templates (I name it "theme" since it holds everything related to the
visual styles of the site).
- Inside theme/static/ setup your frontend tooling. I use Webpack to
compile SASS, run Autoprefixer, and add ES6 transpilation to my JS. You
can use whatever you like (grunt, gulp, bash scripts, etc). I configure
it to output my JS and CSS to theme/static/build, creating main.css and
main.js. I then point my templates to static/build/main.css and
static/build/main.js.
- Nearly all task runners support LiveReload via a plugin or something.
I use the Webpack plugin and installed an extension in my browser. Works
perfect.
At this point the only thing pending is deployment. I choose to not
track the build/ folder in git, so I have extended my Fabric setup to
run Webpack locally in production mode on each deploy and copy the
assets to the server (on the same location as the dev assets, so no
changes in templates are required). This gives me minified and uglified
production builds. Django Compressor handles cache invalidation.
Hope that helps!
On 2017-06-30 2:51 AM, Roger van Schie wrote:
Any suggestions for an efficient methodology to deal with css vendor
prefixes?
As this will probably tie in, anyone got a nice strategy for using
SASS? ( I would really love to use Foundation6 with mezzanine, I find
the code much more semantic than bootstrap and way quicker to code)( I
know I can use Foundation6 with just css, but that defeats the purpose
of saving time)
As a bonus bonus, anyone running a livereload type of server with
Mezzanine for development? (I hate having to push refresh all the
time, really wastes time)
Thanks
Roger
--
You received this message because you are subscribed to the Google
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Mezzanine
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.