Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any tool for combining front-end JS files in NodeJS?

I have front-end JS files:

-js
  -a.js
  -b.js
  -c.js

and I request http://example.com/js/all.js, I will get a file with all contents of a.js, b.js and c.js.

Is there any library provides such function in NodeJS?

like image 600
Kevin Avatar asked Apr 19 '12 05:04

Kevin


1 Answers

require.js should offer the functionality you're looking for if the node common.js isn't enough.

like image 82
djlumley Avatar answered Oct 01 '22 16:10

djlumley