thabti / react-native-css

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

Added option to pretty print output. #14

Closed originalgremlin closed 9 years ago

originalgremlin commented 9 years ago

Hi. Great module! This module will really help bring the styles of my react and react-native code closer together. It would be useful to have an option to make the final output human-readable. This PR tries to accomplish that as simply as possible. Let me know if you have any questions or concerns.

thabti commented 9 years ago

@originalgremlin awesome thank you

thabti commented 9 years ago

Okay I've released that merged, the new version is v1.2.16. I am glad you like it, and I am thinking of somehow having it run with the react-native packager, maybe this weekend. @originalgremlin

https://circleci.com/gh/sabeurthabti/react-native-css/51

originalgremlin commented 9 years ago

Cool cool. Thanks a bunch.

Getting the packager to run your watcher directly will be challenging, I think, but fortunately probably unnecessary. A simple way to get the packager to notice your changes is modify the parent project's start script within package.json:

  "scripts": {
    "start": "node_modules/react-native/packager/packager.sh --root src/styles"
  },

Then npm start will launch a packager which also launches the styles directory. It may not be what you're looking for, though, since each user of react-native-css will have to modify their root package.json. Did you have something more awesomer in mind?