-
Notifications
You must be signed in to change notification settings - Fork 48
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
nzambello
committed
Dec 23, 2017
0 parents
commit 1bb92f7
Showing
9 changed files
with
2,942 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 @@ | ||
{ | ||
"presets": [ | ||
"env", | ||
"react" | ||
] | ||
} |
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,68 @@ | ||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
|
||
### Vim ### | ||
# swap | ||
[._]*.s[a-v][a-z] | ||
[._]*.sw[a-p] | ||
[._]s[a-v][a-z] | ||
[._]sw[a-p] | ||
# session | ||
Session.vim | ||
# temporary | ||
.netrwhist | ||
*~ | ||
# auto-generated tag files | ||
tags |
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,15 @@ | ||
# react-csv-reader | ||
React component that handles csv file input. | ||
|
||
## Installation | ||
Install the package with either yarn or npm. | ||
|
||
With yarn: | ||
```sh | ||
$ yarn add react-csv-reader | ||
``` | ||
|
||
With npm: | ||
```sh | ||
$ npm install --save react-csv-reader | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,29 @@ | ||
{ | ||
"name": "react-csv-reader", | ||
"version": "0.1.0", | ||
"description": "React component that handles csv file input.", | ||
"main": "dist/react-csv-reader.js", | ||
"repository": "https://github.com/nzambello/react-csv-reader", | ||
"bugs": "https://github.com/nzambello/react-csv-reader/issues", | ||
"author": "Nicola Zambello (github.com/nzambello)", | ||
"homepage": "https://github.com/nzambello/react-csv-reader#readme", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel-core": "^6.24.1", | ||
"babel-loader": "^7.0.0", | ||
"babel-preset-env": "^1.5.0", | ||
"babel-preset-react": "^6.24.1", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4", | ||
"webpack": "^2.5.1" | ||
}, | ||
"peerDependencies": { | ||
"prop-types": "*", | ||
"react": "*", | ||
"react-dom": "*" | ||
}, | ||
"scripts": { | ||
"build": "webpack -p", | ||
"watch": "webpack --watch --progress" | ||
} | ||
} |
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,17 @@ | ||
import React from "react" | ||
import { func } from "prop-types" | ||
|
||
const CSVReader = ({ onFileLoaded, onError }) => { | ||
return ( | ||
<div> | ||
<p>Welcome to CSVReader</p> | ||
</div> | ||
) | ||
} | ||
|
||
CSVReader.propTypes = { | ||
onFileLoaded: func, | ||
onError: func | ||
} | ||
|
||
export default CSVReader |
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,35 @@ | ||
var path = require("path") | ||
|
||
module.exports = { | ||
devtool: "source-map", | ||
entry: "./src/index.js", | ||
output: { | ||
filename: "react-csv-reader.js", | ||
path: path.resolve(__dirname, "dist"), | ||
library: "CSVReader", | ||
libraryTarget: "commonjs2" | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
loader: "babel-loader" | ||
} | ||
] | ||
}, | ||
externals: { | ||
react: { | ||
commonjs: "react", | ||
commonjs2: "react", | ||
amd: "react", | ||
root: "React" | ||
}, | ||
"prop-types": { | ||
commonjs: "prop-types", | ||
commonjs2: "prop-types", | ||
amd: "prop-types", | ||
root: "PropTypes" | ||
} | ||
} | ||
} |
Oops, something went wrong.