Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Requirejs optimize tool exclude folders

Tags:

requirejs

I am trying to optimize a project with r.js and am confused about how to exclude a certain folder from the copy step. My structure is...

/index.htm
/scripts/main.js
/scripts/require.js
/scripts/libs/jquery/jquery.js
/scripts/libs/other/ /* I want NONE of this folder to be moved to the build */

Is it possible to do this?

like image 803
jcreamer898 Avatar asked Feb 09 '12 21:02

jcreamer898


1 Answers

In your build config you can exclude files and folders using the fileExclusionRegExp property.

So for you example you would have:

fileExclusionRegExp: /^other$/

This will exclude any folders or files called other.

like image 147
jacob.toye Avatar answered Sep 22 '22 00:09

jacob.toye