#10641 closed enhancement (wontfix)
Don't exclude .htaccess from build
Reported by: | Whistl0r | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | BuildSystem | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When you build a custom Dojo build, the buildsystem currently won't copy any files starting with a ".", that include ".htaccess" files.
I would like to see that changed, so that .htaccess files would also be copied.
Why? In our custom code for example, we have special chars like German Umlauts "äöüß". We need to serve these scripts as UTF-8. Sometimes if you forget to set a "charset"-attribute in the script tag, the script would be parsed as ISO-8859-1 for example. So we added an .htaccess file to our custom (layer) folder with the content "AddCharset utf-8 .js". If someone forgot to set the charset attribute, it won't hurt, because the server will send the file as UTF-8.
If the buildystem wouldn't exclude a .htaccess file, it would work out of the box...
I attached a patch, which wouldn't exclude .htaccess files.
Attachments (1)
Change History (4)
Changed 11 years ago by
Attachment: | Patch for #10641.patch added |
---|
comment:1 follow-up: 2 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I am reticent to apply this patch -- it makes a special exclusion for .htaccess files. I prefer a more general solution, something that would allow generic copying or hidden files. But then, the more I think about it, this seems more the job of the application's build process, call the dojo build process, then it can copy over any other files it feels are necessary.
I suggest that path for fixing this issue: have your build process copy over the files after the dojo build process has run.
comment:2 follow-up: 3 Changed 11 years ago by
Replying to jburke:
I am reticent to apply this patch -- it makes a special exclusion for .htaccess files. I prefer a more general solution, something that would allow generic copying or hidden files. But then, the more I think about it, this seems more the job of the application's build process, call the dojo build process, then it can copy over any other files it feels are necessary.
I suggest that path for fixing this issue: have your build process copy over the files after the dojo build process has run.
If you think this should be covered by the application's build process, why does the current build process excludes all files, starting with a dot? I guess you do it, to ignore some folders of the version control system (btw: if this is the reason, shouldn't it be enought, to just exclude folders starting with a dot?), why is this allowed and not deferred to the application's build process, too?
comment:3 Changed 11 years ago by
Replying to Whistl0r:
If you think this should be covered by the application's build process, why does the current build process excludes all files, starting with a dot? I guess you do it, to ignore some folders of the version control system (btw: if this is the reason, shouldn't it be enought, to just exclude folders starting with a dot?), why is this allowed and not deferred to the application's build process, too?
It is normally desired to not copy hidden files, and usually you are right, that probably means source control files, so it is the default.
Once the control over that becomes more fine grained, then it becomes more options to set, and overall the more switches exposed to the user in the build system, the harder it is to approach. I can see that it is an imperfect solution though.
Modifies fileUtil.js that it won't exclude .htaccess files