Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #44 from FezVrasta/deps-upgrade
Browse files Browse the repository at this point in the history
chore: upgraded dependencies
  • Loading branch information
souporserious authored Sep 22, 2017
2 parents ef520ee + 99b963d commit 53fd32b
Show file tree
Hide file tree
Showing 5 changed files with 1,004 additions and 355 deletions.
26 changes: 9 additions & 17 deletions example/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import { VelocityTransitionGroup } from 'velocity-react'
import Transition from 'react-motion-ui-pack'
import { Manager, Target, Popper, Arrow } from '../src/react-popper'
import { placements } from 'popper.js'
import PopperJS from 'popper.js'
import Portal from 'react-travel'
import outy from 'outy'

Expand Down Expand Up @@ -66,13 +66,11 @@ class MultipleExample extends Component {

render() {
const { placement } = this.state
return (
<div>
<select
value={placement}
onChange={e => this.setState({ placement: e.target.value })}
>
{placements.map(placement =>
return <div>
<select value={placement} onChange={e => this.setState({
placement: e.target.value,
})}>
{PopperJS.placements.map(placement =>
<option key={placement} value={placement}>
{placement}
</option>
Expand All @@ -83,8 +81,7 @@ class MultipleExample extends Component {
Box
</Target>
<Popper placement="left">
{({ popperProps }) =>
<div {...popperProps} className="popper">
{({ popperProps }) => <div {...popperProps} className="popper">
Content Left
<Arrow>
{({ arrowProps }) =>
Expand All @@ -97,18 +94,13 @@ class MultipleExample extends Component {
<Arrow className="popper__arrow" />
</Popper>
<Portal>
<Popper
className="popper"
placement={placement}
modifiers={modifiers}
>
<Popper className="popper" placement={placement} modifiers={modifiers}>
Dynamic Content in a Portal!
<Arrow className="popper__arrow" />
</Popper>
</Portal>
</Manager>
</div>
)
</div>;
}
}

Expand Down
40 changes: 22 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"description": "React wrapper around PopperJS.",
"main": "lib/react-popper.js",
"types": "react-popper.d.ts",
"files": ["dist", "lib", "react-popper.d.ts"],
"files": [
"dist",
"lib",
"react-popper.d.ts"
],
"scripts": {
"build:lib": "babel src --out-dir lib",
"build": "npm run build:lib && NODE_ENV=production webpack --config webpack.prod.config.js",
Expand Down Expand Up @@ -38,36 +42,36 @@
},
"dependencies": {
"is-equal-shallow": "^0.1.3",
"popper.js": "^1.10.8",
"popper.js": "^1.11.0",
"prop-types": "^15.5.10"
},
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-core": "^6.17.0",
"babel-loader": "^6.2.5",
"babel-loader": "^7.1.1",
"babel-plugin-external-helpers": "^6.18.0",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"chokidar": "^1.6.1",
"css-loader": "^0.25.0",
"css-loader": "^0.28.4",
"glamor": "3.0.0-1",
"html-tag-names": "^1.1.1",
"http-server": "^0.9.0",
"node-libs-browser": "^1.0.0",
"node-sass": "^3.2.0",
"html-tag-names": "^1.1.2",
"http-server": "^0.10.0",
"node-libs-browser": "^2.0.0",
"node-sass": "^4.5.3",
"outy": "^0.1.2",
"postcss-loader": "^0.13.0",
"react": "15.3.2",
"react-dom": "15.3.2",
"react-measure": "^1.4.6",
"react-motion-ui-pack": "^0.10.2",
"postcss-loader": "^2.0.6",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-measure": "^2.0.2",
"react-motion-ui-pack": "^0.10.3",
"react-travel": "^1.3.0",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"svg-tag-names": "^1.1.0",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"svg-tag-names": "^1.1.1",
"velocity-react": "^1.2.2",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.9.0"
"webpack": "^3.4.1",
"webpack-dev-server": "^2.6.1"
}
}
19 changes: 10 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
var path = require('path')
var nodeModulesDir = path.resolve(__dirname, 'node_modules')
var examplePath = path.resolve(__dirname, 'example')

module.exports = {
entry: {
index: ['webpack/hot/dev-server', './example/index.jsx'],
},
entry: path.resolve(examplePath, 'index.jsx'),
output: {
path: './example',
path: examplePath,
filename: 'bundle.js',
},
module: {
loaders: [
{ test: /\.(js|jsx)/, loader: 'babel-loader' },
{ test: /\.scss$/, loader: 'style!css!postcss!sass?sourceMap' },
{
test: /\.scss$/,
loader: 'style-loader!css-loader!sass-loader?sourceMap',
},
],
},
resolve: {
extensions: ['', '.js', '.jsx'],
extensions: ['.js', '.jsx'],
},
devServer: {
contentBase: './example',
contentBase: examplePath,
},
}
};
6 changes: 2 additions & 4 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const externals = {
}

var config = {
entry: {
index: './src/react-popper.js',
},
entry: './src/react-popper.js',
output: {
path: path.join(__dirname, 'dist'),
publicPath: 'dist/',
Expand All @@ -41,7 +39,7 @@ var config = {
},
plugins: [new webpack.BannerPlugin(banner)],
resolve: {
extensions: ['', '.js', '.jsx'],
extensions: ['.js', '.jsx'],
},
externals: externals,
}
Expand Down
Loading

0 comments on commit 53fd32b

Please sign in to comment.