Watch for changes and run tests during development using grunt watch
.
#117
Reference in New Issue
Block a user
No description provided.
Delete Branch "watch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In development, watch for changes to
src/Layout.js
and keep running tests whenever the file changes. Helps to ensure that a breaking change is not introduced while developing.That was fast! Thanks @vjeux. (Please also bless https://github.com/facebook/react-native/pull/1776! 😛)
Yeah so sorry about this, I want to do a proper review of aspectRatio and merge it but I kept putting it to the next day :(
https://github.com/facebook/react-native/pull/1776 is the tiny css-layout change that was needed to allow the children of a
measure
function based node to also be laid out.Regarding the
aspectRatio
PR, I am looking at how to make aspectRatio work horizontally too. Currently becausemeasure
only works one way (given width, it calculates height) theaspectRatio
also works in just one direction. To be able to useaspectRatio
such that given a height, it would calculate the width to maintain ratio, we need to makemeasure
more generic.Any idea how to make
measure
take both width and height, so that it can work both ways?Oh interesting. Yeah would be nice. You should look at sizeThatFits and layoutSubviews in iOS. It has proven to be a good abstraction to implement "hard" layouts. https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/#//apple_ref/occ/instm/UIView/sizeThatFits:
Thanks for the contribution to the build :-)
Quick question - is there any reason the watch runs the ci task rather than the build task? (See the comments that describe the difference)
@ColinEberhardt The
build
task would cause Chrome to keep opening again and again while developing. This is more like continuous integration if you think about it.@vjeux The
sizeThatFits
API looks nice. It takes aCGSize
as input - pretty much what we need for our genericmeasure
function in css-layout. Currentlymeasure
only takeswidth
- hence the limitation.Just need to modify css-layout to let
measure
take a width and a height and then set layout properties based on the returned value.@paramaggarwal fair enough, I guess that would be quite disruptive.