Skip to content

Commit

Permalink
Purge moment from examples, fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-suhas committed Dec 14, 2017
1 parent 55de7b8 commit f0a994a
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 91 deletions.
1 change: 0 additions & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"webpack": "^3.0.0"
},
"dependencies": {
"moment": "^2.18.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
Expand Down
3 changes: 1 addition & 2 deletions examples/basic/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const moment = require('moment');
const React = require('react');
const ReactDOM = require('react-dom');
const createElement = React.createElement;

const Test = createElement('div', {}, [
createElement('h1', {}, ['AutoDllPlugin Basic Setup']),
createElement('p', {}, [moment().format('LLLL')]),
createElement('p', {}, [new Date().toDateString()]),
]);

ReactDOM.render(Test, document.getElementById('root'));
16 changes: 6 additions & 10 deletions examples/basic/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@ const AutoDllPlugin = require('../../lib');

module.exports = {
entry: {
app: './src/index.js'
app: './src/index.js',
},

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

plugins: [
new AutoDllPlugin({
debug: true,
filename: '[name].dll.js',
entry: {
vendor: [
'react',
'react-dom',
'moment'
]
}
})
]
vendor: ['react', 'react-dom'],
},
}),
],
};
1 change: 0 additions & 1 deletion examples/minification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"webpack": "^3.0.0"
},
"dependencies": {
"moment": "^2.18.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
Expand Down
3 changes: 1 addition & 2 deletions examples/minification/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const moment = require('moment');
const React = require('react');
const ReactDOM = require('react-dom');
const createElement = React.createElement;

const Test = createElement('div', {}, [
createElement('h1', {}, ['AutoDllPlugin Basic Setup']),
createElement('p', {}, [moment().format('LLLL')]),
createElement('p', {}, [new Date().toDateString()]),
]);

ReactDOM.render(Test, document.getElementById('root'));
18 changes: 6 additions & 12 deletions examples/minification/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,23 @@ const AutoDllPlugin = require('../../lib');

module.exports = {
entry: {
app: './src/index.js'
app: './src/index.js',
},

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

plugins: [
new AutoDllPlugin({
debug: true,
filename: '[name].dll.js',
entry: {
vendor: [
'react',
'react-dom',
'moment'
]
vendor: ['react', 'react-dom'],
},
plugins: [
new webpack.optimize.UglifyJsPlugin(),
]
})
]
plugins: [new webpack.optimize.UglifyJsPlugin()],
}),
],
};
1 change: 0 additions & 1 deletion examples/performance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"howler": "^2.0.4",
"html-webpack-plugin": "^2.29.0",
"immutable": "^3.8.1",
"moment": "^2.18.1",
"pixi.js": "^4.5.3",
"polished": "^1.2.1",
"react": "^15.6.1",
Expand Down
1 change: 0 additions & 1 deletion examples/performance/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import axios from 'axios';
import Draft from 'draft-js';
import howler from 'howler';
import Immutable from 'immutable';
import moment from 'moment';
import Pixi from 'pixi.js';
import polished from 'polished';
import React from 'react';
Expand Down
3 changes: 0 additions & 3 deletions examples/performance/src/TestMoment.js

This file was deleted.

32 changes: 14 additions & 18 deletions examples/performance/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ const AutoDllPlugin = require('../../lib');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
entry: [
'babel-polyfill',
'./src/index.js'
],
entry: ['babel-polyfill', './src/index.js'],
devtool: 'source-map',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
publicPath: '/',
},

module: {
Expand All @@ -23,16 +20,16 @@ module.exports = {
use: {
loader: 'babel-loader',
options: {
presets: ['env', 'react']
}
}
}
]
presets: ['env', 'react'],
},
},
},
],
},

devServer: {
hot: true,
historyApiFallback: true
historyApiFallback: true,
},

plugins: [
Expand All @@ -46,7 +43,6 @@ module.exports = {
'babel-polyfill',
'react',
'react-dom',
'moment',
'styled-components',
'polished',
'redux',
Expand All @@ -61,14 +57,14 @@ module.exports = {
'howler',
'react-motion',
'react-player',
'pixi.js'
]
}
'pixi.js',
],
},
}),
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
inject: true,
template: './src/index.html',
})
]
};
}),
],
};
1 change: 0 additions & 1 deletion examples/recommended/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"webpack": "^3.1.0"
},
"dependencies": {
"moment": "^2.18.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
Expand Down
3 changes: 1 addition & 2 deletions examples/recommended/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const moment = require('moment');
const React = require('react');
const ReactDOM = require('react-dom');
const createElement = React.createElement;

const Test = createElement('div', {}, [
createElement('h1', {}, ['AutoDllPlugin Recommended Setup']),
createElement('p', {}, [moment().format('LLLL')]),
createElement('p', {}, [new Date().toDateString()]),
]);

ReactDOM.render(Test, document.getElementById('root'));
14 changes: 5 additions & 9 deletions examples/recommended/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
publicPath: '/',
},

plugins: [
Expand All @@ -22,12 +22,8 @@ module.exports = {
filename: '[name]_[hash].js',
path: './dll',
entry: {
vendor: [
'react',
'react-dom',
'moment'
]
}
})
]
vendor: ['react', 'react-dom'],
},
}),
],
};
1 change: 0 additions & 1 deletion experiments/inherit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"dependencies": {
"font-awesome": "^4.7.0",
"moment": "^2.18.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
Expand Down
36 changes: 14 additions & 22 deletions experiments/inherit/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ module.exports = {
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
publicPath: '/',
},

module: {
rules: [
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
use: ['style-loader', 'css-loader'],
},
{
test: /\.(eot|svg|ttf|woff(2)?)(\?v=\d+\.\d+\.\d+)?/,
use: [
{
loader: 'url-loader',
options: {
limit: 8192
}
}
]
}
]
limit: 8192,
},
},
],
},
],
},

plugins: [
Expand All @@ -45,16 +45,8 @@ module.exports = {
inject: true,
filename: '[name].[hash].js',
entry: {
vendor: [
'./src/awesome-module.js',
'react',
'react-dom',
'moment',
'font-awesome'
],
other: [
'react'
]
vendor: ['./src/awesome-module.js', 'react', 'react-dom', 'font-awesome'],
other: ['react'],
},

path: './dll',
Expand All @@ -63,8 +55,8 @@ module.exports = {
output: {},
plugins: [
// new UglifyJsPlugin()
]
}
})
]
],
},
}),
],
};
1 change: 0 additions & 1 deletion specs/fixtures/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"webpack-dev-server": "^2.7.1"
},
"dependencies": {
"moment": "^2.18.1",
"react": "^15.6.1",
"react-dom": "^15.6.1"
},
Expand Down
5 changes: 2 additions & 3 deletions specs/fixtures/basic/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const moment = require('moment');
const React = require('react');
const ReactDOM = require('react-dom');
const createElement = React.createElement;
Expand All @@ -8,7 +7,7 @@ console.log(text);

const Test = createElement('div', {}, [
createElement('h1', {}, [ 'AutoDllPlugin Recommended Setup' ]),
createElement('p', {}, [ moment().format('LLLL') ])
createElement('p', {}, [new Date().toDateString()])
]);

ReactDOM.render(Test, document.getElementById('root'));
ReactDOM.render(Test, document.getElementById('root'));
2 changes: 1 addition & 1 deletion specs/fixtures/basic/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
filename: '[name]_[hash].js',
path: './dll',
entry: {
vendor: ['react', 'react-dom', 'moment'],
vendor: ['react', 'react-dom'],
},
}),
],
Expand Down

0 comments on commit f0a994a

Please sign in to comment.