Skip to content

Commit

Permalink
fix(repo): update imports, update webpack setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bringking committed Sep 17, 2017
1 parent 87fcc30 commit 98af61f
Show file tree
Hide file tree
Showing 19 changed files with 2,294 additions and 1,112 deletions.
3,115 changes: 2,144 additions & 971 deletions demo/package-lock.json

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,27 @@
},
"homepage": "https://github.com/RinconStrategies/react-web-animation",
"devDependencies": {
"babel-core": "^6.0.20",
"babel-eslint": "^4.1.3",
"babel-loader": "^6.0.1",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-es2015": "^6.0.15",
"babel-preset-react": "^6.0.15",
"babel-preset-stage-0": "^6.0.15",
"eslint-plugin-react": "^3.6.2",
"react-hot-loader": "^1.3.0",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.1"
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"eslint-plugin-react": "^7.3.0",
"react-hot-loader": "^1.3.1",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.8.2"
},
"dependencies": {
"json-loader": "^0.5.4",
"lodash.flatten": "^4.1.0",
"lodash.range": "^3.1.2",
"react-web-animation": "*",
"json-loader": "^0.5.7",
"lodash.flatten": "^4.4.0",
"lodash.range": "^3.2.0",
"react": "16.0.0-rc.3",
"react-dom": "16.0.0-rc.3",
"react-router": "^4.0.0",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2"
}
}
22 changes: 11 additions & 11 deletions demo/server.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config');

new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, 'localhost', function ( err ) {
if ( err ) {
console.log(err);
}
console.log('Listening at localhost:3000');
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
}).listen(3000, 'localhost', err => {
if (err) {
console.log(err);
}
console.log('Listening at localhost:3000');
});
2 changes: 1 addition & 1 deletion demo/src/animate_css.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Animated } from '../../lib';
import { Animated } from 'react-web-animation';

export default class AnimateCss extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Animated } from '../../lib';
import { Animated } from 'react-web-animation';

export default class Basic extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/basic_group.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { AnimationGroup, Animatable } from '../../lib';
import { AnimationGroup, Animatable } from 'react-web-animation';

export default class BasicGroup extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/basic_sequence.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { AnimationSequence, Animatable } from '../../lib';
import { AnimationSequence, Animatable } from 'react-web-animation';

export default class BasicSequence extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/parallax_starfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { Component } from 'react';
import range from 'lodash.range';
import assign from 'lodash.assign';
import { AnimationGroup, Animatable } from '../../lib';
import { AnimationGroup, Animatable } from 'react-web-animation';

export default class ParallaxStarfield extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/scrolling.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/prop-types */
import React, { Component } from 'react';
import range from 'lodash.range';
import { Animatable, AnimationGroup } from '../../lib';
import { Animatable, AnimationGroup } from 'react-web-animation';

export default class Scrolling extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/spinning_dots.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import range from 'lodash.range';
import assign from 'lodash.assign';
import flatten from 'lodash.flatten';
import { Animated } from '../../lib';
import { Animated } from 'react-web-animation';

export default class SpinningDots extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/welcome.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Animated } from '../../lib';
import { Animated } from 'react-web-animation';

const getCenterKeyFrames = () => [
{ transform: 'scale(1)', fill: '#00D8FF', opacity: 1, offset: 0 },
Expand Down
46 changes: 24 additions & 22 deletions demo/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
var path = require('path');
var webpack = require('webpack');
const path = require('path');
const webpack = require('webpack');

module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/index'
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/index',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'client.js',
publicPath: '/dist/',
},
plugins: [new webpack.HotModuleReplacementPlugin()],
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
},
},
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'client.js',
publicPath: '/dist/'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src')
}]
}
},
};
74 changes: 33 additions & 41 deletions demo/webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
var webpack = require('webpack');
var path = require('path');
const webpack = require('webpack');
const path = require('path');

module.exports = {

entry: {
client: [path.join(__dirname, 'src/index.js')]
},

output: {
path: 'dist',
filename: '[name].js'
},

plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.NoErrorsPlugin()
entry: {
client: [path.join(__dirname, 'src/index.js')],
},

output: {
path: path.join(__dirname, './dist'),
filename: '[name].js',
},

plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new webpack.optimize.UglifyJsPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
],

resolve: {
extensions: ['.js', '.jsx', '.json'],
},
node: {
fs: 'empty',
},
module: {
loaders: [
{ test: /\.json/, loader: 'json-loader' },
{ test: /\.jsx$/, exclude: [/node_modules/], loader: 'babel-loader' },
{ test: /\.js$/, exclude: [/node_modules/], loader: 'babel-loader' },
],

resolve: {
extensions: ['', '.js', '.jsx', '.json']
},
node: {
fs: 'empty'
},
module: {
loaders: [
{ test: /\.json/, loader: 'json-loader' },
{ test: /\.jsx$/, exclude: [/node_modules/], loader: 'babel' },
{ test: /\.js$/, exclude: [/node_modules/], loader: 'babel' }
]
}
},
};






12 changes: 6 additions & 6 deletions examples/with-inferno/server.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config');

new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, 'localhost', function ( err ) {
if ( err ) {
historyApiFallback: true,
}).listen(3000, 'localhost', err => {
if (err) {
console.log(err);
}
console.log('Listening at localhost:3000');
Expand Down
32 changes: 16 additions & 16 deletions examples/with-inferno/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
var path = require('path');
var webpack = require('webpack');
const path = require('path');
const webpack = require('webpack');

module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/index'
'./src/index',
],
resolve: {
alias: {
'react': 'inferno-compat',
'react-dom': 'inferno-compat'
}
react: 'inferno-compat',
'react-dom': 'inferno-compat',
},
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'client.js',
publicPath: '/dist/'
publicPath: '/dist/',
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
plugins: [new webpack.HotModuleReplacementPlugin()],
module: {
loaders: [{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src')
}]
}
loaders: [
{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src'),
},
],
},
};
12 changes: 6 additions & 6 deletions examples/with-preact/server.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config');

new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, 'localhost', function ( err ) {
if ( err ) {
historyApiFallback: true,
}).listen(3000, 'localhost', err => {
if (err) {
console.log(err);
}
console.log('Listening at localhost:3000');
Expand Down
32 changes: 16 additions & 16 deletions examples/with-preact/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
var path = require('path');
var webpack = require('webpack');
const path = require('path');
const webpack = require('webpack');

module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/index'
'./src/index',
],
resolve: {
alias: {
'react': 'preact-compat',
'react-dom': 'preact-compat'
}
react: 'preact-compat',
'react-dom': 'preact-compat',
},
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'client.js',
publicPath: '/dist/'
publicPath: '/dist/',
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
plugins: [new webpack.HotModuleReplacementPlugin()],
module: {
loaders: [{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src')
}]
}
loaders: [
{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src'),
},
],
},
};
Loading

0 comments on commit 98af61f

Please sign in to comment.