-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update dependencies; internal restructure
- Loading branch information
matthew
committed
Dec 13, 2018
1 parent
6fd2778
commit 02f5cc1
Showing
31 changed files
with
2,451 additions
and
67,403 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
/node_modules | ||
node_modules | ||
dist |
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
/node_modules | ||
node_modules | ||
src | ||
examples | ||
dummy_data | ||
.babelrc | ||
.gitignore | ||
webpack.config.js |
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
Large diffs are not rendered by default.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React from 'react' | ||
import { render } from 'react-dom' | ||
import Demo from './components/Demo' | ||
import Demo from './Demo' | ||
|
||
render(<Demo />, document.getElementById('root')) |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"name": "react_google_calendar", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "An implementation of react-big-calendar populated by linked Google calendars", | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"start": "webpack-dev-server --mode development --config webpack.base.config.js --open --hot --history-api-fallback --env.PLATFORM=local --env.VERSION=stag", | ||
"build": "webpack --mode production --config webpack.prod.config.js --env.PLATFORM=production --env.VERSION=stag --progress", | ||
"test": "jest" | ||
"build": "webpack --mode production", | ||
"deploy": "gh-pages -d examples/dist", | ||
"prepublishOnly": "npm run transpile", | ||
"publish-demo": "npm run build && npm run deploy", | ||
"start": "webpack-dev-server --mode development --open --display-error-details", | ||
"test": "jest", | ||
"transpile": "babel src -d dist --copy-files" | ||
}, | ||
"keywords": [ | ||
"react", | ||
|
@@ -15,20 +19,17 @@ | |
], | ||
"author": "crash <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"peerDependencies": { | ||
"array.prototype.flat": "^1.2.1", | ||
"axios": "^0.16.2", | ||
"bluebird": "^3.5.2", | ||
"bootstrap": "^4.1.3", | ||
"dotenv": "^6.1.0", | ||
"express": "^4.16.4", | ||
"moment": "^2.22.2", | ||
"react": "^15.6.1", | ||
"react-big-calendar": "^0.14.4", | ||
"react-dom": "^15.6.1" | ||
"react": "^16.6.3", | ||
"react-big-calendar": "^0.20.2", | ||
"react-dom": "^16.6.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0", | ||
"@babel/cli": "^7.0.0", | ||
"@babel/core": "^7.2.0", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0", | ||
"@babel/plugin-proposal-decorators": "^7.0.0", | ||
"@babel/plugin-proposal-export-namespace-from": "^7.0.0", | ||
|
@@ -38,9 +39,12 @@ | |
"@babel/polyfill": "^7.0.0-beta.51", | ||
"@babel/preset-env": "^7.0.0-beta.51", | ||
"@babel/preset-react": "^7.0.0-beta.51", | ||
"babel-loader": "^8.0.0-beta.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-loader": "^8.0.4", | ||
"babel-preset-react": "^6.24.1", | ||
"css-loader": "^0.28.11", | ||
"gh-pages": "^2.0.1", | ||
"html-loader": "^0.5.5", | ||
"html-webpack-plugin": "^3.2.0", | ||
"jest": "^23.6.0", | ||
"node-sass": "^4.9.4", | ||
|
@@ -53,6 +57,9 @@ | |
"webpack-dev-server": "^3.1.0", | ||
"webpack-merge": "^4.1.4" | ||
}, | ||
"resolutions": { | ||
"babel-core": "7.0.0-bridge.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/crashspringfield/react-google-calendar" | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
@@ -1,3 +1,41 @@ | ||
import Calendar from './app/components/Calendar.js' | ||
import React, { Component } from 'react' | ||
import BigCalendar from 'react-big-calendar' | ||
import moment from 'moment' | ||
|
||
export default Calendar | ||
import 'react-big-calendar/lib/css/react-big-calendar.css' | ||
import googleAPI from "./utils/googleAPI" | ||
|
||
const localizer = BigCalendar.momentLocalizer(moment) | ||
|
||
export default class Calendar extends Component { | ||
constructor(props) { | ||
super(props) | ||
this.state = { | ||
events: [] | ||
} | ||
} | ||
|
||
componentDidMount = () => { | ||
if (this.props.config) { | ||
this.getGoogleCalendarEvents() | ||
} else { | ||
console.log("React Google Calendar requires you pass a configuration object") | ||
} | ||
} | ||
|
||
getGoogleCalendarEvents = () => { | ||
googleAPI.getAllCalendars(this.props.config) | ||
.then(events => { | ||
this.setState({ events }) | ||
}) | ||
.catch(err => { throw new Error(err) }) | ||
} | ||
|
||
render = () => | ||
<div> | ||
<BigCalendar | ||
localizer={localizer} | ||
events={this.state.events} | ||
style={{ height: "100vh" }} /> | ||
</div> | ||
} |
Oops, something went wrong.