-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43e10c7
commit af616b0
Showing
42 changed files
with
2,214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[android] | ||
target = Google Inc.:Google APIs:23 | ||
|
||
[maven_repositories] | ||
central = https://repo1.maven.org/maven2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
[ignore] | ||
|
||
# We fork some components by platform. | ||
.*/*.web.js | ||
.*/*.android.js | ||
|
||
# Some modules have their own node_modules with overlap | ||
.*/node_modules/node-haste/.* | ||
|
||
# Ugh | ||
.*/node_modules/babel.* | ||
.*/node_modules/babylon.* | ||
.*/node_modules/invariant.* | ||
|
||
# Ignore react and fbjs where there are overlaps, but don't ignore | ||
# anything that react-native relies on | ||
.*/node_modules/fbjs/lib/Map.js | ||
.*/node_modules/fbjs/lib/fetch.js | ||
.*/node_modules/fbjs/lib/ExecutionEnvironment.js | ||
.*/node_modules/fbjs/lib/ErrorUtils.js | ||
|
||
# Flow has a built-in definition for the 'react' module which we prefer to use | ||
# over the currently-untyped source | ||
.*/node_modules/react/react.js | ||
.*/node_modules/react/lib/React.js | ||
.*/node_modules/react/lib/ReactDOM.js | ||
|
||
.*/__mocks__/.* | ||
.*/__tests__/.* | ||
|
||
.*/commoner/test/source/widget/share.js | ||
|
||
# Ignore commoner tests | ||
.*/node_modules/commoner/test/.* | ||
|
||
# See https://github.com/facebook/flow/issues/442 | ||
.*/react-tools/node_modules/commoner/lib/reader.js | ||
|
||
# Ignore jest | ||
.*/node_modules/jest-cli/.* | ||
|
||
# Ignore Website | ||
.*/website/.* | ||
|
||
# Ignore generators | ||
.*/local-cli/generator.* | ||
|
||
# Ignore BUCK generated folders | ||
.*\.buckd/ | ||
|
||
.*/node_modules/is-my-json-valid/test/.*\.json | ||
.*/node_modules/iconv-lite/encodings/tables/.*\.json | ||
.*/node_modules/y18n/test/.*\.json | ||
.*/node_modules/spdx-license-ids/spdx-license-ids.json | ||
.*/node_modules/spdx-exceptions/index.json | ||
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json | ||
.*/node_modules/resolve/lib/core.json | ||
.*/node_modules/jsonparse/samplejson/.*\.json | ||
.*/node_modules/json5/test/.*\.json | ||
.*/node_modules/ua-parser-js/test/.*\.json | ||
.*/node_modules/builtin-modules/builtin-modules.json | ||
.*/node_modules/binary-extensions/binary-extensions.json | ||
.*/node_modules/url-regex/tlds.json | ||
.*/node_modules/joi/.*\.json | ||
.*/node_modules/isemail/.*\.json | ||
.*/node_modules/tr46/.*\.json | ||
|
||
|
||
[include] | ||
|
||
[libs] | ||
node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
node_modules/react-native/flow | ||
flow/ | ||
|
||
[options] | ||
module.system=haste | ||
|
||
esproposal.class_static_fields=enable | ||
esproposal.class_instance_fields=enable | ||
|
||
munge_underscores=true | ||
|
||
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' | ||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\)$' -> 'RelativeImageStub' | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FixMe | ||
|
||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy | ||
|
||
[version] | ||
0.23.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
# Android/IJ | ||
# | ||
.idea | ||
.gradle | ||
local.properties | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
android/app/libs | ||
android/keystores/debug.keystore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var WEATHER_API_KEY = ‘db8f12a8be0e1eb5’ | ||
|
||
|
||
export default function fetchWeather(city, state) { | ||
let url = `http://api.wunderground.com/api/${WEATHER_API_KEY}/conditions/q/=${state}/${city}.json` | ||
|
||
return fetch(url).then((response) => response.json()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
var React = require('react-native'); | ||
|
||
var { | ||
View, | ||
Text, | ||
TouchableHighlight, | ||
StyleSheet | ||
} = React; | ||
|
||
class Main extends React.Component{ | ||
render(){ | ||
return( | ||
<View style ={styles.mainContainer}> | ||
<TouchableHighlight | ||
onPress={this._onPressButton} | ||
style={styles.button} | ||
underlayColor="white"> | ||
<Text style={styles.title}>Cycle the Bay</Text> | ||
</TouchableHighlight> | ||
</View> | ||
) | ||
} | ||
}; | ||
|
||
var styles = StyleSheet.create({ | ||
mainContainer: { | ||
flex: 1, | ||
padding: 30, | ||
marginTop: 65, | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
backgroundColor: '#658D9F' | ||
}, | ||
title: { | ||
marginBottom: 10, | ||
fontSize: 25, | ||
textAlign: 'center', | ||
color: '#658D9F' | ||
}, | ||
button: { | ||
height: 45, | ||
flexDirection: 'row', | ||
backgroundColor: 'white', | ||
borderColor: 'white', | ||
borderWidth: 1, | ||
borderRadius: 8, | ||
marginBottom: 10, | ||
alignSelf: 'stretch', | ||
justifyContent: 'center' | ||
}, | ||
buttonText:{ | ||
color: '#658D9F' | ||
} | ||
}); | ||
|
||
module.exports = Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var React = require('react-native'); | ||
|
||
var { | ||
View, | ||
Text, | ||
StyleSheet | ||
} = React; | ||
|
||
import fetchWeather from "./api/api" | ||
import weatherIcon from "././utils/icons" | ||
|
||
|
||
const WeatherAppNative = React.createClass ({ | ||
|
||
getInitialState() { | ||
return { | ||
city: "Oakland", | ||
country: "United States", | ||
icon: weatherIcon() | ||
}; | ||
}, | ||
|
||
// Render weather hourly forecast | ||
|
||
}) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export default function(iconCode) { | ||
let map = { | ||
'01d': '\uf00d', // clear sky | ||
'02d': '\uf002', // few clouds | ||
'03d': '\uf041', // scattered clouds | ||
'04d': '\uf013', // broken clouds | ||
'09d': '\uf019', // shower rain | ||
'10d': '\uf008', // rain | ||
'11d': '\uf016', // thunderstorm | ||
'13d': '\uf064', // snow | ||
'50d': '\uf014', // mist | ||
'01n': '\uf077', | ||
'02n': '\uf086', | ||
'03n': '\uf041', | ||
'04n': '\uf031', | ||
'09n': '\uf028', | ||
'10n': '\uf028', | ||
'11n': '\uf016', | ||
'13n': '\uf016', | ||
'50n': '\uf014' | ||
}; | ||
|
||
return map[iconCode] || '\uf03e'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import re | ||
|
||
# To learn about Buck see [Docs](https://buckbuild.com/). | ||
# To run your application with Buck: | ||
# - install Buck | ||
# - `npm start` - to start the packager | ||
# - `cd android` | ||
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US` | ||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck | ||
# - `buck install -r android/app` - compile, install and run application | ||
# | ||
|
||
lib_deps = [] | ||
for jarfile in glob(['libs/*.jar']): | ||
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) | ||
lib_deps.append(':' + name) | ||
prebuilt_jar( | ||
name = name, | ||
binary_jar = jarfile, | ||
) | ||
|
||
for aarfile in glob(['libs/*.aar']): | ||
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) | ||
lib_deps.append(':' + name) | ||
android_prebuilt_aar( | ||
name = name, | ||
aar = aarfile, | ||
) | ||
|
||
android_library( | ||
name = 'all-libs', | ||
exported_deps = lib_deps | ||
) | ||
|
||
android_library( | ||
name = 'app-code', | ||
srcs = glob([ | ||
'src/main/java/**/*.java', | ||
]), | ||
deps = [ | ||
':all-libs', | ||
':build_config', | ||
':res', | ||
], | ||
) | ||
|
||
android_build_config( | ||
name = 'build_config', | ||
package = 'com.cyclethebay', | ||
) | ||
|
||
android_resource( | ||
name = 'res', | ||
res = 'src/main/res', | ||
package = 'com.cyclethebay', | ||
) | ||
|
||
android_binary( | ||
name = 'app', | ||
package_type = 'debug', | ||
manifest = 'src/main/AndroidManifest.xml', | ||
keystore = '//android/keystores:debug', | ||
deps = [ | ||
':app-code', | ||
], | ||
) |
Oops, something went wrong.