By default r.js
already excludes from processing directories that begin with a period. The setting is fileExclusionRegExp
and the default value is /^\./
so .svn
will be skipped. (Looking at the code of r.js
I see that fileExclusionRegExp
matches against the basename of each file.)
The error you are seeing is consistent with your input directory coinciding with your output. You do not set keepBuildDir
to true
, so your output directory is being removed. Change your dir
to build somewhere else.
Or you keep your output under version control. Setting keepBuildDir
to true
would take care of the immediate problem but could create more problems down the road if you perform transformations on the output of r.js
.