thabti / react-native-css

Style React-Native components with css
MIT License
769 stars 66 forks source link

Build only adding first style to JS and stoping after that. #20

Closed dorthwein closed 8 years ago

dorthwein commented 8 years ago

Given the following, the JS object will only contain "text": {color: "#FFF"} and nothing after that.

text {
    color: $light
}
center {
    text-align: center;
    align-items: center;
    align-self: center;
    justify-content: center;
}
thabti commented 8 years ago

@dorthwein I will look into this, I am happy to accept a PR.

thabti commented 8 years ago

@dorthwein I had a look and it seems that you're right. I am just between things right now and I will get to fixing this issue soon. I'd recommend to use css for now and not scss.

irfaan commented 8 years ago

Still suffering from this even with this patch. Any idea why that might be?

thabti commented 8 years ago

@davidgruebl can you shed some light on this?

thabti commented 8 years ago

@irfaan can you provide some example?

derektu commented 8 years ago

I have the same problem. Here is my css:

maincontainer {
    flex: 1;
    justify-content: center;
    align-items: center;
    background-color: #F5FCFF;
}
rootcontainer {
    flex: 1;
    font-size: 18;
}

and the compiled js only contains the first block (maincontainer).

thabti commented 8 years ago

@derektu I am looking at this today, and I will improve the testing so we can cover these scenarios.

thabti commented 8 years ago

@dorthwein @derektu @irfaan hi guys I tried to replicate this on my machine and I had no luck figuring out the issue.

https://circleci.com/gh/sabeurthabti/react-native-css/81/ https://github.com/sabeurthabti/react-native-css/blob/master/test/rnc.test.js.

I am running: node:5.3.0 and npm: 3.3.2.

irfaan commented 8 years ago

Seeing the issue on node: v5.7.0, npm: 3.6.0 (react-native-css 1.2.26)

Rolled back to react-native-css v1.2.18 and no longer experience the issue. Picked that version because that was what I used on a previous project. I didn't iterate through to see where the problem began.

thabti commented 8 years ago

thank you @irfaan, I will investigate further.

thabti commented 8 years ago

I tried with the specific version of node and all the tests are working fine. @irfaan if you have time can you clone this repo and run npm install && npm test and let me know what you get? or any error you get.

derektu commented 8 years ago

I am running node 4.3.1, and after upgrade to v.1.2.27, the program goes away !!. Thanks for your help.

thabti commented 8 years ago

@derektu awesome glad it has been resolved for you. I will keep this ticket open.

irfaan commented 8 years ago

@sabeurthabti Can confirm that 1.2.27 solved the problem. Thanks! Also, if you were waiting for me to confirm, thanks again!

thabti commented 8 years ago

@irfaan yeah I was, glad it's working for you. I will close this issue now. Thank you everyone :+1: