diff --git a/docs/src/ReactPlayground.js b/docs/src/ReactPlayground.js index 00fa73dbca..bcc4bacc12 100644 --- a/docs/src/ReactPlayground.js +++ b/docs/src/ReactPlayground.js @@ -1,51 +1,93 @@ -/* eslint-disable */ import React from 'react'; import classNames from 'classnames'; -import Accordion from '../../src/Accordion'; -import Alert from '../../src/Alert'; -import Badge from '../../src/Badge'; -import Button from '../../src/Button'; -import ButtonGroup from '../../src/ButtonGroup'; -import ButtonToolbar from '../../src/ButtonToolbar'; -import CollapsableNav from '../../src/CollapsableNav'; -import CollapsableMixin from '../../src/CollapsableMixin'; -import Carousel from '../../src/Carousel'; -import CarouselItem from '../../src/CarouselItem'; -import Col from '../../src/Col'; -import DropdownButton from '../../src/DropdownButton'; -import Glyphicon from '../../src/Glyphicon'; -import Grid from '../../src/Grid'; -import Input from '../../src/Input'; -import Jumbotron from '../../src/Jumbotron'; -import Label from '../../src/Label'; -import ListGroup from '../../src/ListGroup'; -import ListGroupItem from '../../src/ListGroupItem'; -import Nav from '../../src/Nav'; -import Navbar from '../../src/Navbar'; -import NavItem from '../../src/NavItem'; -import MenuItem from '../../src/MenuItem'; -import Modal from '../../src/Modal'; -import ModalTrigger from '../../src/ModalTrigger'; -import OverlayTrigger from '../../src/OverlayTrigger'; -import OverlayMixin from '../../src/OverlayMixin'; -import PageHeader from '../../src/PageHeader'; -import PageItem from '../../src/PageItem'; -import Pager from '../../src/Pager'; -import Panel from '../../src/Panel'; -import PanelGroup from '../../src/PanelGroup'; -import Popover from '../../src/Popover'; -import ProgressBar from '../../src/ProgressBar'; -import Row from '../../src/Row'; -import SplitButton from '../../src/SplitButton'; -import TabbedArea from '../../src/TabbedArea'; -import Table from '../../src/Table'; -import TabPane from '../../src/TabPane'; -import Tooltip from '../../src/Tooltip'; -import Well from '../../src/Well'; -/* eslint-enable */ +import * as modAccordion from '../../src/Accordion'; +import * as modAlert from '../../src/Alert'; +import * as modBadge from '../../src/Badge'; +import * as modmodButton from '../../src/Button'; +import * as modButtonGroup from '../../src/ButtonGroup'; +import * as modmodButtonToolbar from '../../src/ButtonToolbar'; +import * as modCollapsableNav from '../../src/CollapsableNav'; +import * as modCollapsableMixin from '../../src/CollapsableMixin'; +import * as modCarousel from '../../src/Carousel'; +import * as modCarouselItem from '../../src/CarouselItem'; +import * as modCol from '../../src/Col'; +import * as modDropdownButton from '../../src/DropdownButton'; +import * as modGlyphicon from '../../src/Glyphicon'; +import * as modGrid from '../../src/Grid'; +import * as modInput from '../../src/Input'; +import * as modJumbotron from '../../src/Jumbotron'; +import * as modLabel from '../../src/Label'; +import * as modListGroup from '../../src/ListGroup'; +import * as modListGroupItem from '../../src/ListGroupItem'; +import * as modNav from '../../src/Nav'; +import * as modNavbar from '../../src/Navbar'; +import * as modNavItem from '../../src/NavItem'; +import * as modMenuItem from '../../src/MenuItem'; +import * as modModal from '../../src/Modal'; +import * as modModalTrigger from '../../src/ModalTrigger'; +import * as modOverlayTrigger from '../../src/OverlayTrigger'; +import * as modOverlayMixin from '../../src/OverlayMixin'; +import * as modPageHeader from '../../src/PageHeader'; +import * as modPageItem from '../../src/PageItem'; +import * as modPager from '../../src/Pager'; +import * as modPanel from '../../src/Panel'; +import * as modPanelGroup from '../../src/PanelGroup'; +import * as modPopover from '../../src/Popover'; +import * as modProgressBar from '../../src/ProgressBar'; +import * as modRow from '../../src/Row'; +import * as modSplitButton from '../../src/SplitButton'; +import * as modTabbedArea from '../../src/TabbedArea'; +import * as modTable from '../../src/Table'; +import * as modTabPane from '../../src/TabPane'; +import * as modTooltip from '../../src/Tooltip'; +import * as modWell from '../../src/Well'; import {CodeMirror, IS_NODE} from './CodeMirror'; -import babel from 'babel/browser'; +import babel from 'babel-core/browser'; + +/* eslint-disable */ +const Accordion = modAccordion.default; +const Alert = modAlert.default; +const Badge = modBadge.default; +const Button = modmodButton.default; +const ButtonGroup = modButtonGroup.default; +const ButtonToolbar = modmodButtonToolbar.default; +const CollapsableNav = modCollapsableNav.default; +const CollapsableMixin = modCollapsableMixin.default; +const Carousel = modCarousel.default; +const CarouselItem = modCarouselItem.default; +const Col = modCol.default; +const DropdownButton = modDropdownButton.default; +const Glyphicon = modGlyphicon.default; +const Grid = modGrid.default; +const Input = modInput.default; +const Jumbotron = modJumbotron.default; +const Label = modLabel.default; +const ListGroup = modListGroup.default; +const ListGroupItem = modListGroupItem.default; +const Nav = modNav.default; +const Navbar = modNavbar.default; +const NavItem = modNavItem.default; +const MenuItem = modMenuItem.default; +const Modal = modModal.default; +const ModalTrigger = modModalTrigger.default; +const OverlayTrigger = modOverlayTrigger.default; +const OverlayMixin = modOverlayMixin.default; +const PageHeader = modPageHeader.default; +const PageItem = modPageItem.default; +const Pager = modPager.default; +const Panel = modPanel.default; +const PanelGroup = modPanelGroup.default; +const Popover = modPopover.default; +const ProgressBar = modProgressBar.default; +const Row = modRow.default; +const SplitButton = modSplitButton.default; +const TabbedArea = modTabbedArea.default; +const Table = modTable.default; +const TabPane = modTabPane.default; +const Tooltip = modTooltip.default; +const Well = modWell.default; +/* eslint-enable */ const IS_MOBILE = typeof navigator !== 'undefined' && ( navigator.userAgent.match(/Android/i) diff --git a/package.json b/package.json index e6d60675d3..5bf8936b4b 100644 --- a/package.json +++ b/package.json @@ -33,10 +33,10 @@ "react": ">=0.13" }, "devDependencies": { - "babel": "^4.7.0", - "babel-core": "^4.7.4", + "babel": "^5.1.10", + "babel-core": "^5.1.10", "babel-eslint": "^3.0.1", - "babel-loader": "^4.1.0", + "babel-loader": "^5.0.0", "bootstrap": "^3.3.4", "brfs": "^1.4.0", "chai": "^2.2.0", diff --git a/register-babel.js b/register-babel.js index baca38d3a3..81ed4c2cf7 100644 --- a/register-babel.js +++ b/register-babel.js @@ -1,4 +1,4 @@ -require('babel/register')({ +require('babel-core/register')({ ignore: /node_modules/, optional: ['es7.objectRestSpread'] });