Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklam718 committed Sep 11, 2016
0 parents commit fe12b3e
Show file tree
Hide file tree
Showing 50 changed files with 2,717 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "airbnb",
"installedESLint": true,
"parser": "babel-eslint",
"ecmaFeatures": {
"jsx": true
},
"env": {
"es6": true
},
"plugins": [
"react"
],
"rules": {
"no-use-before-define": [0]
},
"globals": {
"require": false
},
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
popupDialogExample/node_modules
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Jack Lam <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import PopupDialog from './src/PopupDialog';
import Overlay from './src/components/Overlay';
import Dialog from './src/components/Dialog';
import Animation from './src/animations/Animation';
import ScaleAnimation from './src/animations/ScaleAnimation';

export { Overlay, Dialog, Animation, ScaleAnimation };
export default PopupDialog;
25 changes: 25 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
0 info it worked if it ends with ok
1 verbose cli [ '/Users/jacklam/.nvm/versions/node/v6.2.0/bin/node',
1 verbose cli '/Users/jacklam/.nvm/versions/node/v6.2.0/bin/npm',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: start
4 verbose stack at run (/Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/lib/run-script.js:150:19)
4 verbose stack at /Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/lib/run-script.js:60:5
4 verbose stack at /Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5
4 verbose stack at checkBinReferences_ (/Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45)
4 verbose stack at final (/Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3)
4 verbose stack at then (/Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5)
4 verbose stack at ReadFileContext.<anonymous> (/Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:295:20)
4 verbose stack at ReadFileContext.callback (/Users/jacklam/.nvm/versions/node/v6.2.0/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)
5 verbose cwd /Users/jacklam/workspace/react-native-popup-dialog
6 error Darwin 15.5.0
7 error argv "/Users/jacklam/.nvm/versions/node/v6.2.0/bin/node" "/Users/jacklam/.nvm/versions/node/v6.2.0/bin/npm" "start"
8 error node v6.2.0
9 error npm v3.8.9
10 error missing script: start
11 error If you need help, you may report this error at:
11 error <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]
37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "react-native-popup-dialog",
"version": "0.0.1",
"description": "React Native Popup Dialog for IOS & Android.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/jacklam718/react-native-popup-dialog.git"
},
"keywords": [
"dialog",
"popup",
"react dialog",
"react-native",
"react-native-popup-dialog",
"react-native-dialog",
"react native dialog",
"popup-dialog",
"react-component",
"ios",
"android"
],
"author": "jacklam <[email protected]> (https://github.com/jacklam718)",
"license": "MIT",
"homepage": "https://github.com/jacklam718/react-native-popup-dialog/blob/master/README.md",
"devDependencies": {
"babel-eslint": "^6.1.2",
"eslint": "^3.4.0",
"eslint-config-airbnb": "^10.0.1",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-react": "^6.2.0"
}
}
6 changes: 6 additions & 0 deletions popupDialogExample/.buckconfig
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
58 changes: 58 additions & 0 deletions popupDialogExample/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[ignore]

# We fork some components by platform.
.*/*[.]android.js

# Ignore templates with `@flow` in header
.*/local-cli/generator.*

# Ignore malformed json
.*/node_modules/y18n/test/.*\.json

# Ignore the website subdir
<PROJECT_ROOT>/website/.*

# Ignore BUCK generated dirs
<PROJECT_ROOT>/\.buckd/

# Ignore unexpected extra @providesModule
.*/node_modules/commoner/test/source/widget/share.js

# Ignore duplicate module providers
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
.*/node_modules/jest-runtime/build/__tests__/.*

[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

experimental.strict_type_args=true

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\|pdf\)$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

unsafe.enable_getters_and_setters=true

[version]
^0.30.0
41 changes: 41 additions & 0 deletions popupDialogExample/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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
#
*.iml
.idea
.gradle
local.properties

# node.js
#
node_modules/
npm-debug.log

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore
1 change: 1 addition & 0 deletions popupDialogExample/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
46 changes: 46 additions & 0 deletions popupDialogExample/PopupDialogExample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { RoundButton } from 'react-native-button-component';
import PopupDialog from 'react-native-popup-dialog';

export default class PopupDialogExample extends Component {
constructor(props) {
super(props);
this.state = {
dialogOpen: false,
};

this.openDialog = this.openDialog.bind(this);
}

openDialog() {
this.popupDialog.openDialog();
}

render() {
return (
<View style={styles.container}>
<RoundButton
text="Open Dialog"
onPress={this.openDialog}
/>
<PopupDialog
ref={(popupDialog => { this.popupDialog = popupDialog; })}
>
<View>
<Text>Hello</Text>
</View>
</PopupDialog>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
// backgroundColor: '#000',
},
});
66 changes: 66 additions & 0 deletions popupDialogExample/android/app/BUCK
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.popupdialogexample',
)

android_resource(
name = 'res',
res = 'src/main/res',
package = 'com.popupdialogexample',
)

android_binary(
name = 'app',
package_type = 'debug',
manifest = 'src/main/AndroidManifest.xml',
keystore = '//android/keystores:debug',
deps = [
':app-code',
],
)
Loading

0 comments on commit fe12b3e

Please sign in to comment.