Open MarkKharitonov opened 10 years ago
Forgot to mention the YUI_config:
YUI_config = {
combine: true,
filter: 'debug',
comboBase: 'http://localhost:8000/combo?',
root: 'yui/',
base: 'http://localhost:8000/yui/',
maxURLLength: 4000,
groups: {
gallery: {
combine: true,
filter: 'debug',
root: 'yui-gallery/',
base: 'http://localhost:8000/yui-gallery/',
patterns: {
"gallery-": {},
"gallerycss-": { type: "css" }
}
}
}
};
I shortened the nesting of the yui and yui-gallery folders by moving the content from under the build folder to be direct children of yui or yui-gallery:
C:\work\if\server\web>dir yui
Volume in drive C has no label.
Volume Serial Number is 82A9-DF6B
Directory of C:\work\if\server\web\yui
01/01/2014 08:55 AM <DIR> .
01/01/2014 08:55 AM <DIR> ..
09/29/2013 11:46 AM <DIR> align-plugin
09/29/2013 11:46 AM <DIR> anim-base
09/29/2013 11:46 AM <DIR> anim-color
09/29/2013 11:46 AM <DIR> anim-curve
...
yui-gallery was treated in a similar fashion.
I have created a pull request (https://github.com/rgrove/combohandler/pull/36) addressing this issue. In addition, the pull request adds baseUrl config option to allow for scenarios where the static content and the dynamic content is served from different servers.
Thanks so much for looking into this, I apologize for not responding earlier on the yui-support thread. Windows is definitely our Achilles' heel on this project, as neither myself nor @rgrove develop on or run the service in a Windows environment. I'll get the pull request sorted straightaway.
@MarkKharitonov What happens when you provide a fully-valid Windows rootPath
(via path.join) when using the webRoot
config?
var path = require('path');
// ...
app.get('/combo',
combo.combine({
rootPath: path.join(__dirname, 'web'),
webRoot: __dirname
}),
combo.respond);
(as an aside, webRoot
is generally what you want, basePath
is an old, confusing config that is all but deprecated now)
Please, see Try 2 described in the body of the issue above. It contains the answer to your question.
Actually, no it doesn't. I asked you if the valid path created by path.join(__dirname, "web")
worked in the webRoot
config, not a concatenation of __dirname
and "/web/"
(because the plain concatenation would result in a path that had both windows and unix path seperators in it).
In any case, I can't accept this patch until the tests pass. It will be Monday before I can attempt to spin up a Windows VM and fix the tests myself.
On Jan 11, 2014, at 19:04, MarkKharitonov notifications@github.com wrote:
Please, see Try 2 described in the body of the issue above. It contains the answer to your question.
— Reply to this email directly or view it on GitHub.
Using either path.join or concat ultimately yield the same result, because the code calls path.normalize at the end.
Also note that Windows recognizes both kinds of slashes as path separators.
Le samedi 11 janvier 2014, Daniel Stockman a écrit :
Actually, no it doesn't. I asked you if the valid path created by
path.join(__dirname, "web")
worked in thewebRoot
config, not a concatenation of__dirname
and"/web/"
(because the plain concatenation would result in a path that had both windows and unix path seperators in it).In any case, I can't accept this patch until the tests pass. It will be Monday before I can attempt to spin up a Windows VM and fix the tests myself.
On Jan 11, 2014, at 19:04, MarkKharitonov <notifications@github.com<javascript:_e({}, 'cvml', 'notifications@github.com');>> wrote:
Please, see Try 2 described in the body of the issue above. It contains the answer to your question.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/rgrove/combohandler/issues/35#issuecomment-32114356 .
"There are two kinds of people.Those whose guns are loaded and those who dig." ("The good, the bad and the ugly") So let us drink for our guns always be loaded.
Thanks, I can rule that out now. I didn't know Windows accepted both delimiters. Crazy.
On Sat, Jan 11, 2014 at 7:53 PM, MarkKharitonov notifications@github.com wrote:
Using either path.join or concat ultimately yield the same result, because the code calls path.normalize at the end. Also note that Windows recognizes both kinds of slashes as path separators. Le samedi 11 janvier 2014, Daniel Stockman a écrit :
Actually, no it doesn't. I asked you if the valid path created by
path.join(__dirname, "web")
worked in thewebRoot
config, not a concatenation of__dirname
and"/web/"
(because the plain concatenation would result in a path that had both windows and unix path seperators in it).In any case, I can't accept this patch until the tests pass. It will be Monday before I can attempt to spin up a Windows VM and fix the tests myself.
On Jan 11, 2014, at 19:04, MarkKharitonov <notifications@github.com<javascript:_e({}, 'cvml', 'notifications@github.com');>> wrote:
Please, see Try 2 described in the body of the issue above. It contains the answer to your question.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/rgrove/combohandler/issues/35#issuecomment-32114356 .
Be well and prosper.
"There are two kinds of people.Those whose guns are loaded and those who dig." ("The good, the bad and the ugly")
So let us drink for our guns always be loaded.
Reply to this email directly or view it on GitHub: https://github.com/rgrove/combohandler/issues/35#issuecomment-32114588
The CSS url rewrite does not seem to work. Here is my web directory:
_dirname
is C:\work\if\server The project loads yui/datatable-sort/assets/skins/sam/datatable-sort.css, which contains the following line:Try 1:
The combined css rewrites the aforementioned url directive to
Try 2:
Which yields exactly the same url directive:
Of course, it does not work.