Closed novascreen closed 8 years ago
Woah, awesome @novascreen, will take a look shortly!
@mxstbr do you have windows machine to test it?
@mxstbr do you have windows machine to test it?
Sadly I realized today that my old Windows machine doesn't boot anymore. :cry: This looks good code-wise though!
could you use this? https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
@novascreen I'm very interested in this too, let me know if I can be of any help!
One small comment then we can merge this, cross-env
is definitely the right way to go! Thanks!
@novascreen @mxstbr I've made some findings about the 404 problem.
It seems that the assets are emitted by carte-blanche using path.join to determine their destination path, which would be \path\to\file on windows instead of the expected path/to/file.
To fix this I tried to use path.posix in few points and this seems to fix the problem, now I can see carte-blanche's dashboard with a list of components on the left.
Anyway there are still 404, I guess that those come from the react-plugin instead, those calls fails: http://localhost:8082/variations/srccomponents/Header.js
and thus I don't see my component rendered.
That's great news @ingro i'll check this out tonight (i'm 6h behind you guys), could you share your work as a patch or a branch in your own fork?
@mxstbr i'll move that function into utils and write a test tonight.
When you're on Windows and get a path in Node e.g. with process.cwd()
you'll get something like C:\\Repos\\react-boilerplate
, but when you console.log
that you actually get C:\Repos\react-boilerplate
. So when you build that script as a string those backslashes just escape the next character (in the example R
of Repos
and r
of react
), and the end result is C:Reposreact-boilerplate
. That's why I duplicated the backslashes.
I'm a little noob with github, I'll try with creating a new branch on a fork asap!
Awesome, this is going to be good!
great, thanks @ingro
I'm still a little puzzled on how the list of components is generated and handed to the client, maybe @mxstbr could give us some insights on that part? I feel that the remaing problems lies there.
hey @ingro, i think i found all the places where we needed to enforce forward slashes
@mxstbr i also made sure that tests are passing on Windows. Let me know if you're ok with me adding that slash
dependency and also changing some of your tests.
Is it normal that a variation takes 5+ seconds to load into the iframe?
That Travis CI build failure doesn't seem related to anything I did, does it?
Great work @novascreen , I'll check it out immediately!
I can confirm that now it works, although I too can report major slowness when creating and updating variations, but I don't know if they are related to windows.
I just fails due the flow linting which is fixed in this PR https://github.com/carteb/carte-blanche/pull/379
btw don't worry about it being slow on Windows. Running the development environment of carte blanche uses inline-source maps which leads to huge files that take a while to load
I had to fix a merge conflict and therefor opened another PR that I merged: https://github.com/carteb/carte-blanche/pull/381
Thx a lot @novascreen & @ingro - awesome work 👌
I thought I'd start looking into this a little bit and fixed some cross-env issues in npm scripts and also figured out why #290 happened. The backslashes in Windows get escaped away in
webpack-plug/src/apply.js
when building the script that's returned as a string. I'm now able to runnpm run example:dev
without errors andlocalhost:8080
loads, unfortunately atlocalhost:8080/carte-blanche
i'm getting a 404 and am a little stuck as to why that might be. I see thebasePath
used in a few places and it should maybe always have a forward slash or at least sometimes (anything that's a URL obviously). Anyone have ideas as to the next steps?npm run example:dev:iron
also didn't work for me, but maybe that's related. In any case i'd say that's a battle for another day.