One difficulty I ran into was in trying to exclude development / debug libraries from the distribution. One example, for instance, is the jquery-ui development bundle.
In my case this is in C:\Dev\CVT\source\javascripts\lib\jquery-ui\development-bundle (and my watch.sourceDir = 'source').
I tried excluding it via the copy.exclude config using string paths. I tried a bunch of different ways, for example:
exclude: ['javascripts\\lib\\jquery-ui\\development-bundle']
assuming this would exclude everything in that directory, but no luck. From looking at the source code of the copy module, in this case the check to exclude a file is:
c.exclude.indexOf(file.inputFileName) > -1
So it seems the exclude param would need to specify a full path and file name of every file you want excluded. Is this what's intended? Naively I would have expected this to be reversed:
file.inputFileName.indexOf(c.exclude) > -1
Thanks,
Loki
PS eventually I did achieve what I wanted via regex instead, but would still like to hear about the question above.
exclude: [/jquery-ui\/development-bundle/]
--
You received this message because you are subscribed to the Google Groups "mimosajs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mimosajs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We are using require, but at this time we keep the various debug / development versions alongside the deployment ones, so the copy compiler was copying them all without the exclude config.
While I have you on the line ...
I wanted to pass the preamble flag to r.js / uglify2 to automatically include a copy right notice in the build js files. Is this possible? I tried this but it didn't seem to work:
require: {
optimize: {
overrides: {
optimize: "uglify2",
uglify2: {
preamble: "/** Copyright(c) 2014 My Company Inc. */"
}
}
}
}
Thanks for your help!
mimosa build -o
Thanks for those tips. At the moment I'm just using the optimize flag:
mimosa build -o