Skip to content

Commit 045d435

Browse files
committed
first
0 parents  commit 045d435

26 files changed

+50951
-0
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": [ "es2015", "react", "stage-1" ]
3+
}
4+

.eslintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "rackt",
3+
"rules": {
4+
"react/jsx-uses-react": 1,
5+
"react/jsx-no-undef": 2,
6+
"react/wrap-multilines": 2
7+
},
8+
"plugins": [
9+
"react"
10+
]
11+
}
12+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
lib
3+
umd

.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.babelrc
2+
.eslintrc
3+
.travis.yml
4+
__tests__
5+
scripts
6+
index.html
7+
karma.conf.js
8+
tests.webpack.js
9+
webpack.config.js

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
node_js:
3+
- stable
4+
cache:
5+
directories:
6+
- node_modules
7+
branches:
8+
only:
9+
- master

CHANGES.md

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
All development happens on GitHub. When creating a pull request, please make sure that all of the following apply:
2+
3+
- The tests pass. The test suite will automatically run when you create the PR. All you need to do is wait a few minutes to see the result in the PR.
4+
- Each commit in your PR should describe a significant piece of work. Work that was done in one commit and then undone later should be squashed into a single commit.
5+
6+
Also, please make sure the `CHANGES.md` document contains a short note about the nature of your change. Just follow the format of the existing entries in that document. If the most recent entry is a release, please start a new section under a `##HEAD` heading.
7+
8+
Thank you for your contribution!

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Ryan Florence
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Relative Links for React Router
2+
3+
This is a WIP with only a couple hours put into the code, but I think it
4+
works, give it a shot, send some pull requests if you run into issues.
5+
6+
## Installation
7+
8+
```
9+
npm install react-router-relative-links react-router-apply-middleware
10+
```
11+
12+
## Usage
13+
14+
```js
15+
import applyMiddleware from 'react-router-apply-middleware'
16+
import { useRelativeLinks, RelativeLink } from 'react-router-relative-links'
17+
18+
// use it like other router middleware
19+
<Router render={applyMiddleware(useRelativeLinks())}/>
20+
21+
// now you can use `RelativeLink` anywhere \o/
22+
<RelativeLink to="../">Up</RelativeLink>
23+
<RelativeLink to="./down">Down</RelativeLink>
24+
<RelativeLink to="../sideways">Sideways</RelativeLink>
25+
<RelativeLink to={{ pathname: 'foo', query: { bar: 'baz' } }}>location descriptors</RelativeLink>
26+
<RelativeLink to={{ query: { bar: 'baz' } }}>just the query</RelativeLink>
27+
```
28+

0 commit comments

Comments
 (0)