1

I'm trying to solve a problem with Grunt, where I wan't to concat multiple JS files together and name them after their parent directory.

project/
  build/
    news/
      news.js
    cart/
      cart.js
    ../
      ....js

  src/
    news/
      news-ajax.js
      news-post.js
      news-animation.js
    cart/
      user.js
      cart-ajax.js
      cart-animation.js
    ../
      ..script-1.js
      ..script-2.js

I was wondering if there is any way to do that with. I don't care about the order. I know RequireJS would be good for this. But these are individual modules that will be used on different pages. It's for something like a webshop. Where we have files for checkout, product list, news and so forth.

If anyone can point me in a direction it would be great.

---- Edit

I it seams the related posts is better then the search i found these links in the related posts but not in the search:

Community
  • 1
  • 1
danjessen
  • 11
  • 3

0 Answers0