Skip to content

Commit

Permalink
Welcome to the monorepo!
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Jan 20, 2017
1 parent 395b3df commit 4349de3
Show file tree
Hide file tree
Showing 96 changed files with 135 additions and 116 deletions.
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions .npmignore

This file was deleted.

7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lerna": "2.0.0-beta.32",
"packages": [
"packages/*"
],
"version": "independent"
}
91 changes: 5 additions & 86 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,91 +1,10 @@
{
"name": "react-router",
"version": "4.0.0-alpha.6",
"description": "Declarative routing for React",
"repository": "ReactTraining/react-router",
"license": "MIT",
"authors": [
"Michael Jackson",
"Ryan Florence"
],
"files": [
"BrowserRouter.js",
"Core.js",
"HashRouter.js",
"Link.js",
"MemoryRouter.js",
"NavLink.js",
"Prompt.js",
"Redirect.js",
"Route.js",
"Router.js",
"ServerRouter.js",
"Switch.js",
"index.js",
"matchPath.js",
"withRouter.js",
"README.md",
"umd"
],
"main": "index.js",
"scripts": {
"start": "echo 'Make sure to `cd website && npm install && npm run build`' && cd website && npm start",
"release": "node ./scripts/release.js",
"build-lib": "babel ./modules -d . --ignore __tests__",
"build-umd": "webpack modules/index.js umd/react-router.js",
"build-min": "webpack -p modules/index.js umd/react-router.min.js",
"build": "node ./scripts/build.js",
"watch": "babel ./modules -d . --ignore __tests__ --watch",
"prepublish": "node ./scripts/build.js",
"clean": "node ./scripts/clean.js",
"lint": "eslint modules",
"test": "karma start --single-run"
},
"dependencies": {
"history": "^4.5.1",
"invariant": "^2.2.2",
"path-to-regexp": "^1.5.3"
},
"peerDependencies": {
"react": "15.x"
"postinstall": "lerna bootstrap",
"start": "cd packages/react-router-website && npm start",
"test": "lerna run test"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.10",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-transform-react-remove-prop-types": "^0.2.11",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"eslint": "^2.13.1",
"eslint-plugin-import": "^1.15.0",
"eslint-plugin-react": "^5.2.2",
"expect": "^1.20.1",
"gzip-size": "^3.0.0",
"in-publish": "^2.0.0",
"karma": "^0.13.22",
"karma-browserstack-launcher": "^1.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-mocha": "^1.0.1",
"karma-mocha-reporter": "^2.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"pretty-bytes": "^3.0.1",
"react": "^15.3.0",
"react-addons-test-utils": "^15.3.1",
"react-dom": "^15.3.0",
"readline-sync": "^1.4.4",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
},
"keywords": [
"react",
"router",
"route",
"routing",
"history",
"link"
]
"lerna": "2.0.0-beta.32"
}
}
7 changes: 7 additions & 0 deletions packages/react-router-website/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
[ "es2015", { "loose": true } ],
"stage-1",
"react"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import ReactDOM from 'react-dom'
import Route from '../../react-router/modules/Route'
import { I, H, B, PAD, lightGray, red } from './bricks'
import { render } from 'react-dom'
import MarkdownViewer from './MarkdownViewer'
import ScrollToMe from './ScrollToMe'
import Route from '../../modules/Route'

export const API = [
{ name: 'Route',
Expand Down Expand Up @@ -77,7 +77,8 @@ class APIDocs extends React.Component {
))}
</B>
)
render(el, this.menu)

ReactDOM.render(el, this.menu)
}

render() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react'
import BrowserRouter from '../../react-router/modules/BrowserRouter'

import BrowserRouter from '../../modules/BrowserRouter'

import { B } from './bricks'
import Examples from './Examples'
import Header from './Header'
import APIDocs from './APIDocs'
import Video from './Video'
import Footer from './Footer'
import LoadBundle from './LoadBundle'
import NewsletterSignup from './NewsletterSignup'
import { B } from './bricks'

const App = () => (
<BrowserRouter>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react'
import Route from '../../modules/Route'
import Switch from '../../modules/Switch'
import Link from '../../modules/Link'
import Route from '../../react-router/modules/Route'
import Switch from '../../react-router/modules/Switch'
import Link from '../../react-router/modules/Link'
import { EXAMPLES } from '../routes'
import { B, H, I, PAD, VSpace, darkGray, lightGray, red } from './bricks'
import LoadBundle from './LoadBundle'
import SourceViewer from './SourceViewer'
import FakeBrowser from './FakeBrowser'
import ScrollToMe from './ScrollToMe'
import { B, H, I, PAD, VSpace, darkGray, lightGray, red } from './bricks'
import { EXAMPLES } from '../routes'

const Nav = (props) => (
<B {...props}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { PropTypes } from 'react'
import MemoryRouter from '../../../react-router/modules/MemoryRouter'
import Route from '../../../react-router/modules/Route'
import { B, V, H, PAD, LIGHT_GRAY, GRAY } from '../bricks'
import MemoryRouter from '../../../modules/MemoryRouter'
import Route from '../../../modules/Route'
import { button } from './style.css'

const LeftArrowIcon = (props) => (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import Link from '../../modules/Link'
import Logo from './Logo'
import Link from '../../react-router/modules/Link'
import { B, H, I, PAD, VSpace, HSpace, lightGray, red, bigFont } from './bricks'
import Logo from './Logo'

const NavLink = ({ to, href, ...props }) => (
<B component={to ? Link : 'a'} props={{ to, href }} margin={`0 ${PAD/2}px`} cursor="pointer" {...props}/>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"name": "react-router-website",
"private": true,
"scripts": {
"build": "webpack -p && npm run service-worker",
"start": "webpack-dev-server --inline",
"service-worker": "cp -R static/ build/ && sw-precache --root='build/' --static-file-globs='build/**/!(*map*)'"
},
"devDependencies": {
"babel-core": "^6.21.0",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-1": "^6.16.0",
"bundle-loader": "0.5.4",
"css-loader": "0.23.1",
"file-loader": "^0.9.0",
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const HTMLWebpackPlugin = require('html-webpack-plugin')

const PROD = process.env.NODE_ENV === 'production'
const HASH = '[chunkHash]'
const ROUTER_SRC = path.join(__dirname, '..', 'modules')
const ROUTER_SRC = path.join(__dirname, '..', 'react-router/modules')

module.exports = {
devtool: 'source-map',
Expand Down Expand Up @@ -32,14 +32,15 @@ module.exports = {

resolve: {
alias: {
// These are for the examples. All modules used to build the actual
// site should import directly from packages/react-router
'react-router/Link': path.join(ROUTER_SRC, 'Link'),
'react-router/Prompt': path.join(ROUTER_SRC, 'Prompt'),
'react-router/Redirect': path.join(ROUTER_SRC, 'Redirect'),
'react-router/Route': path.join(ROUTER_SRC, 'Route'),
'react-router/Router': path.join(ROUTER_SRC, 'Router'),
'react-router/Switch': path.join(ROUTER_SRC, 'Switch'),
'react-router/withRouter': path.join(ROUTER_SRC, 'withRouter'),

// Shim the real router so people can copy paste examples into create-react-app
'react-router/BrowserRouter': path.join(__dirname, 'components', 'ExampleRouter')
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/react-router/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
umd
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
90 changes: 90 additions & 0 deletions packages/react-router/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"name": "react-router",
"version": "4.0.0-alpha.6",
"description": "Declarative routing for React",
"repository": "ReactTraining/react-router",
"license": "MIT",
"authors": [
"Michael Jackson",
"Ryan Florence"
],
"files": [
"BrowserRouter.js",
"Core.js",
"HashRouter.js",
"Link.js",
"MemoryRouter.js",
"NavLink.js",
"Prompt.js",
"Redirect.js",
"Route.js",
"Router.js",
"ServerRouter.js",
"Switch.js",
"index.js",
"matchPath.js",
"withRouter.js",
"README.md",
"umd"
],
"main": "index.js",
"scripts": {
"release": "node ./scripts/release.js",
"build-lib": "babel ./modules -d . --ignore __tests__",
"build-umd": "webpack modules/index.js umd/react-router.js",
"build-min": "webpack -p modules/index.js umd/react-router.min.js",
"build": "node ./scripts/build.js",
"watch": "babel ./modules -d . --ignore __tests__ --watch",
"prepublish": "node ./scripts/build.js",
"clean": "node ./scripts/clean.js",
"lint": "eslint modules",
"test": "karma start --single-run"
},
"dependencies": {
"history": "^4.5.1",
"invariant": "^2.2.2",
"path-to-regexp": "^1.5.3"
},
"peerDependencies": {
"react": "15.x"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.10",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-transform-react-remove-prop-types": "^0.2.11",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"eslint": "^2.13.1",
"eslint-plugin-import": "^1.15.0",
"eslint-plugin-react": "^5.2.2",
"expect": "^1.20.1",
"gzip-size": "^3.0.0",
"in-publish": "^2.0.0",
"karma": "^0.13.22",
"karma-browserstack-launcher": "^1.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-mocha": "^1.0.1",
"karma-mocha-reporter": "^2.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"pretty-bytes": "^3.0.1",
"react": "^15.3.0",
"react-addons-test-utils": "^15.3.1",
"react-dom": "^15.3.0",
"readline-sync": "^1.4.4",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
},
"keywords": [
"react",
"router",
"route",
"routing",
"history",
"link"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4349de3

Please sign in to comment.