thabti / react-native-css

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

V2: package.json points to incorrect main #59

Closed daniloster closed 7 years ago

daniloster commented 7 years ago

Hi all,

I was trying to use this package and faced a simple problem. The package.json is setting: "main": "build/index.js", but, in the npmjs repo, there is not build folder. It seems that build is in the .gitignore file and its is being taken into account as .npmignore when publishing it.

https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package

thabti commented 7 years ago

Hi @daniloster try react-native-css@2.0.5, yarn add react-native-css@2.0.5 It's worth mentioning this module is not longer maintained. I highly recommend looking into styled-components for react-native. This module will function at the style attribute level and won't expend any further.

thanks

daniloster commented 7 years ago

@sabeurthabti The thing is that I am building a Babel transform in order to make a seamless consuming css/scss regardless of the project (native/web). I mean, I have a prototype project where the same code base is used to generate native and web app. Both import css/scss files. I assign the values to style, but under the hoodie, I have treatment to decide if needs to apply to either style or className. So, the question is, do you mind if I copy your code (this code) to use in that babel plugin (as you said that is no longer maintained)? Thanks for the feedback and the great initiative.

thabti commented 7 years ago

@daniloster Please go ahead, I tried to do a babel-transform plugin a few months back. I would love to see your progress. If you are keen I am happy to turn this repo in a babel-plugin. Please share link, so I can try what you make.

daniloster commented 7 years ago

www.npmjs.com/package/babel-plugin-react-native-sass-classname

daniloster commented 7 years ago

It is very naive, but it works!

thabti commented 7 years ago

@daniloster I have added you as a collaborator to this project since you depend on it for your babel-plugin. I am excited to try that in my rn project, looks awesome.

danilosterrapid7 commented 7 years ago

I have a project where I am using it. https://github.com/daniloster/SmartBudget Have a quick look. It is a project where I use to apply some concepts and eventually might become a product.

danilosterrapid7 commented 7 years ago

Btw, this is not my personal profile ;P You might need to add daniloster.

thabti commented 7 years ago

@danilosterrapid7 I invited both :D

thabti commented 7 years ago

smartbudget is excellent nice work