Skip to content

Commit bf443de

Browse files
committed
Using rollup for building the project, and modifying example
1 parent c28d02b commit bf443de

File tree

11 files changed

+9983
-757
lines changed

11 files changed

+9983
-757
lines changed

.babelrc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2-
"presets": ["es2015", "react", "stage-0"],
3-
"plugins": ["transform-decorators-legacy"],
2+
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }],
3+
"@babel/plugin-proposal-class-properties"
4+
],
5+
"presets": [
6+
["@babel/preset-env", {
7+
"modules": false
8+
}],
9+
"@babel/preset-react"
10+
]
411
}

example/index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

example/package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "react-tooltip-example",
3+
"homepage": "https://github.com/wwayne/react-tooltip",
4+
"version": "1.0.0",
5+
"license": "MIT",
6+
"dependencies": {
7+
"gh-pages": "^2.1.1",
8+
"react": "^16.4.1",
9+
"react-dom": "^16.4.1",
10+
"react-scripts": "^1.1.4",
11+
"react-tooltip": "link:.."
12+
},
13+
"scripts": {
14+
"start": "react-scripts start",
15+
"build": "react-scripts build",
16+
"test": "react-scripts test --env=jsdom",
17+
"eject": "react-scripts eject",
18+
"predeploy": "npm run build",
19+
"deploy": "gh-pages -d build"
20+
}
21+
}

example/public/index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="theme-color" content="#000000">
7+
8+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
9+
10+
<title>react-tooltip</title>
11+
</head>
12+
13+
<body>
14+
<noscript>
15+
You need to enable JavaScript to run this app.
16+
</noscript>
17+
18+
<div id="root"></div>
19+
</body>
20+
</html>

example/public/manifest.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"short_name": "react-tooltip",
3+
"name": "react-tooltip",
4+
"start_url": "./index.html",
5+
"display": "standalone",
6+
"theme_color": "#000000",
7+
"background_color": "#ffffff"
8+
}

example/src/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
'use strict'
2-
31
import React from 'react'
42
import ReactDOM from 'react-dom'
5-
import ReactTooltip from '../../src'
3+
import ReactTooltip from 'react-tooltip'
64

75
class Test extends React.Component {
86
constructor(props) {
@@ -499,4 +497,4 @@ class Test extends React.Component {
499497
}
500498
}
501499

502-
ReactDOM.render(<Test />, document.getElementById('main'))
500+
ReactDOM.render(<Test />, document.getElementById('root'))

0 commit comments

Comments
 (0)