Skip to content

Commit

Permalink
docs: fix the Example page's title, and improve docs (jquense#1245)
Browse files Browse the repository at this point in the history
This PR does the following:

- Standardizes some documentation language
- Properly sets the Example page's document title
  - Because we use [`html-webpack-plugin`](https://www.npmjs.com/package/html-webpack-plugin) (via [`webpack-atoms`](https://www.npmjs.com/package/webpack-atoms)) the `index.html` file that was here was not being used
  - This properly sets the page's title using the `title` attribute to the `html-webpack-plugin`
  • Loading branch information
MatthewHerbst authored and jquense committed Mar 21, 2019
1 parent 473d886 commit 2c8c08d
Showing 5 changed files with 28 additions and 38 deletions.
22 changes: 11 additions & 11 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"./dist/react-big-calendar.js": {
"bundled": 470853,
"minified": 153064,
"gzipped": 42298
"bundled": 455683,
"minified": 146246,
"gzipped": 41811
},
"./dist/react-big-calendar.min.js": {
"bundled": 413805,
"minified": 136004,
"gzipped": 38362
"bundled": 393705,
"minified": 127582,
"gzipped": 37597
},
"dist/react-big-calendar.esm.js": {
"bundled": 167523,
"minified": 80477,
"gzipped": 19800,
"bundled": 167469,
"minified": 80464,
"gzipped": 19858,
"treeshaked": {
"rollup": {
"code": 62050,
"code": 62192,
"import_statements": 1470
},
"webpack": {
"code": 65556
"code": 65687
}
}
}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,26 +8,26 @@ Inspired by [Full Calendar](http://fullcalendar.io/).

## Use and Setup

`npm install react-big-calendar --save`
`yarn add react-big-calendar` or `npm install --save react-big-calendar`

Include `react-big-calendar/lib/css/react-big-calendar.css` for styles, and make sure your calendar's container
element has a height, or the calendar won't be visible.

## Starters

* [react-big-calendar](https://github.com/arecvlohe/rbc-starter)
* [react-big-calendar with drag and drop](https://github.com/arecvlohe/rbc-with-dnd-starter)
- [react-big-calendar](https://github.com/arecvlohe/rbc-starter)
- [react-big-calendar with drag and drop](https://github.com/arecvlohe/rbc-with-dnd-starter)

## Run examples locally

```
```sh
$ git clone git@github.com:intljusticemission/react-big-calendar.git
$ cd react-big-calendar
$ npm install
$ npm run examples
$ yarn
$ yarn examples
```

* Open [localhost:3000/examples/index.html](http://localhost:3000/examples/index.html).
- Open [localhost:3000/examples/index.html](http://localhost:3000/examples/index.html).

### Localization and Date Formatting

@@ -42,7 +42,7 @@ Regardless of your choice, you **must** choose a localizer to use this library:
import BigCalendar from 'react-big-calendar'
import moment from 'moment'

const localizer = BigCalendar.momentLocalizer(moment)
const localizer = BigCalendar.momentLocalizer(moment)

const MyCalendar = props => (
<div>
@@ -62,7 +62,7 @@ const MyCalendar = props => (
import BigCalendar from 'react-big-calendar'
import globalize from 'globalize'

const localizer = BigCalendar.globalizeLocalizer(globalize)
const localizer = BigCalendar.globalizeLocalizer(globalize)

const MyCalendar = props => (
<div>
6 changes: 4 additions & 2 deletions examples/Intro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# <a id='intro' href='#intro'>Getting Started</a>

You can install `react-big-calendar` via [npm](https://www.npmjs.com/):
You can install `react-big-calendar` via [yarn](https://yarnpkg.com/en/) or [npm](https://www.npmjs.com/):

npm i --save react-big-calendar
_yarn:_ `yarn add react-big-calendar`

_npm:_ `npm install --save react-big-calendar`

Styles can be found at: `react-big-calendar/lib/css/react-big-calendar.css`, and should be included on the page
with the calendar component. Also make sure that your calendar's container
15 changes: 0 additions & 15 deletions examples/index.html

This file was deleted.

5 changes: 4 additions & 1 deletion examples/webpack.config.js
Original file line number Diff line number Diff line change
@@ -36,5 +36,8 @@ module.exports = {
},
],
},
plugins: [plugins.html(), plugins.extractCss()],
plugins: [
plugins.html({ title: 'React Big Calendar' }),
plugins.extractCss(),
],
}

0 comments on commit 2c8c08d

Please sign in to comment.