express-asset-manager icon indicating copy to clipboard operation
express-asset-manager copied to clipboard

Alternatives

Open gh-naylor opened this issue 11 years ago • 3 comments

This package looks fantastic. Why doesn't it have any more stars or traction? Is there already a better, more popular, alternative out there? I searched and found a few, but there weren't any that particularly stood out.

I feel like I'm missing something.

gh-naylor avatar Feb 11 '14 18:02 gh-naylor

Thanks for your interest. I think this is simply because I did not advertise it. This lib has a very specific usage so it does exist for a few reasons.

The most popular tools for asset management are probably gruntjs or yeoman. They provide a complete platform with many plugins to manage your assets and dependencies. Though they require the developer to learn a lot of conventions and to depend on their platform. At the end of the day you often have to write your own pluggin for very basic tasks. Finally they are basically command line tools so you have to use their API to automate the build if you want to do it automatically at application startup.

What I wanted with this project is a tool which does a few very basic asset pipelining and do it well. Also I wanted to switch from dev to prod transparently (without to much configuration in the views).

So basically it regroups the less compiler, the requirejs optimizer and node-minify into a single lib. Asset declaration in the views is similar to what we have in Rails or Grails: <%- asset("application.js", options) %> with the string "application.js" refering to a group of assets or an entry point (for less and requirejs).

Tug avatar Feb 11 '14 19:02 Tug

That's awesome! Another reason could be that just about everyone is using browserify nowadays, and for good reason. But for those maintaining old projects or whatever, this looks pretty cool.

Is it still up to date with modern express?

factoidforrest avatar Aug 20 '15 00:08 factoidforrest

I'm using Express 3.0 on my project but I think the middleware format hasn't change in express 4. It just needs the res.locals object to be defined for it to work, which looks like it is the case http://expressjs.com/4x/api.html#res.locals ;)

Tug avatar Aug 20 '15 11:08 Tug