Skip to content
This repository has been archived by the owner on Feb 17, 2019. It is now read-only.

Using path.normalize and path.sep to overcome windows issues #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MaksimBurnin
Copy link

Fixes #37

@@ -485,7 +485,7 @@ BroccoliSassCompiler.prototype.handleCacheHit = function(details, inputAndOutput
BroccoliSassCompiler.prototype.scopedFileName = function(file) {
file = this.relativize(file);
if (this.treeName) {
return this.treeName + "/" + file;
return this.treeName + path.sep + file;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use path.join instead?

return path.join(this.treeName, file);

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything we can do to make this happen? This is a bit of a show stopper on Windows!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for abandoning this PR, don't have an env suitable for testing anymore
You could probably apply a change, proposed above and test, I don't think it is the only place where paths are concatenated as strings, but it will be enough to make this PR accepted, hopefully.

@MaksimBurnin
Copy link
Author

I have applied a proposed change, but i don't have a real way to test atm. would be nice if @MrChriZ could test this and verify everything is working

@MrChriZ
Copy link

MrChriZ commented Jun 19, 2017

Thanks @MaksimBurnin. I'm actually using this library by proxy in that I discovered the issue whilst trying to use https://github.com/sass-eyeglass/ember-cli-eyeglass.
I'll see if I can get a working test environment tomorrow anyhow.

@MrChriZ
Copy link

MrChriZ commented Jun 23, 2017

Running a little late with this one - got steamrolled by a few other things.
I'm afraid I can't get broccoli-eyeglass working directly with Ember.
I'm not sure how to set up the inputTree's parameter. Nothing seems to happen when I compile.
I think it might require someone with more experience to test your fix Makim.

@MrChriZ
Copy link

MrChriZ commented Jun 23, 2017

OK I cheated... I copied your updated file into my node_modules/broccoli-eyeglass folder... and low and behold it works (ish)!

The only issue I have is my cssDir option is completely ignored. I have no idea whether this is related to your update, broccoli-eyeglass, or embler-cli-eyeglass

@MaksimBurnin
Copy link
Author

MaksimBurnin commented Jun 23, 2017

@MrChriZ Thanks for you effort.
I might get this wrong, but it looks to me that embler-cli-eyeglass makes up its own cssDir from outputPaths option of EmberApp.
See here: https://github.com/sass-eyeglass/ember-cli-eyeglass/blob/master/index.js#L94
and here: https://github.com/ember-cli/ember-cli/blob/master/lib/broccoli/ember-app.js#L1332

@MaksimBurnin
Copy link
Author

@chriseppstein @stefanpenner Could you guys look into merging or rejecting this one?

@stefanpenner
Copy link
Contributor

stefanpenner commented Jun 24, 2017

@chriseppstein @stefanpenner Could you guys look into merging or rejecting this one?

@MaksimBurnin sorry, I don't have any powerz on this repo. We'll have to wait for mr @chriseppstein

@stefanpenner
Copy link
Contributor

I have powerz now, but we should likely only merge this an add actual windows supports once the tests pass in appveyor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants