Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: What's the current status of JavaScript asset managers? #11

Closed
pydanny opened this issue Apr 8, 2015 · 14 comments
Closed

Question: What's the current status of JavaScript asset managers? #11

pydanny opened this issue Apr 8, 2015 · 14 comments

Comments

@pydanny
Copy link
Member

pydanny commented Apr 8, 2015

Of course, within a month anything we write will be dated. ☕

@halfnibble
Copy link

I can't recall the answer off the top of my head, but Lightweight Django was recently published by the Caktus Group, and they delve deep into using JavaScript with Django. It's a thin book, and may be worth reading through to find the answer.

@halfnibble
Copy link

FYI, I re-read parts of Lightweight Django. It looks like they are using django-compressor for both JavaScript and CSS (including LESS/Sass) asset management.

@grayj
Copy link

grayj commented Apr 17, 2015

I got tired of dealing with these, so now I use Gulp. Would definitely recommend dealing with JavaScript assets via JavaScript. Need NPM for installing assets anyway.

@dansackett
Copy link

I believe Gulp has emerged as a leading build tool. I use it for all frontend tasks and prefer keeping my backend and frontend separate. NPM for all that you can with Bower only if needed.

@treyhunner
Copy link

I always use Node-based tools to manage my JavaScript assets now. I used to use django-compressor, but the front-end community has standardized on Node-based tools.

Gulp is more in than Grunt right now because of its flexibility (piping streams is easy). I would see Broccoli-based asset pipelines becoming more popular (it's used by ember-cli which is growing in popularity).

@gregmuellegger
Copy link

I also stick with Gulp and other NPM based tooling. Gulp is a full buildtool with pipelining, dependencies etc, where django-compressor and alternatives fall short. There is a plugin for everything. I also love integration with transpilers like babeljs (ES6 to ES5 transpiler) and that it's super fast.

I have a gulp command gulp serve that starts django's runserver, watches scss and JS files to rebuild and also provides livereload capabilites. Very easy to setup and as a developer a lot easier to grasp than Grunt.

@tBaxter
Copy link

tBaxter commented Apr 17, 2015

I do it locally with codekit. Which may be grunt underneath for all I know.

@pennomi
Copy link

pennomi commented Apr 17, 2015

Gulp (and Bower), definitely. Once I stopped fighting it and started using a JavaScript build system for JavaScript, virtually all my problems went away. Django compressor was always a headache.

@ngzhian
Copy link

ngzhian commented Apr 17, 2015

webpack is quite popular as well

@bretth
Copy link

bretth commented Apr 19, 2015

There's also a push from soem to keep things simple and use npm as the build tool exemplified by this http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/

@pydanny
Copy link
Member Author

pydanny commented Apr 24, 2015

How about Gulp as the lead, plus suggestions for other tools?

@driesdesmet
Copy link

Gulp seems to be in the lead, but what I'd really like are suggestions to do as pythonic as possible with django-bower and libsass based python preprocessor, if such a tool exists. I'm currently using a combination of gulp, mainly because of 'browsersync' that auto-reloads my browser even when I change django templates. But if there would be a python based solution, i'd drop gulp in a second.

I've also seen other people bringing django-compressor in the mix. Which diversifies the tools used even further.

While typing this, I noticed the original issue was 'javascript asset management' as opposed to using a complete build script. If we limit the scope to javascript asset management only, then I guess django-bower fits well. It's a wrapper around the globally installed bower npm package, but at least it fits in your workflow without adding a package.json or .bowerrc in your source code.

@pydanny pydanny modified the milestone: Two Scoops of Django 1.8 Later Release Apr 24, 2015
@pydanny
Copy link
Member Author

pydanny commented Apr 26, 2015

The lack of consensus here is interesting. Either I defined the question poorly, it's changing too fast, or there is no best thing to suggest.

@pydanny
Copy link
Member Author

pydanny commented Apr 26, 2015

Went with gulp.js. When the status quo changes in the near future we may switch to that. Am I being too cynical? 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests