Move web pack 1 example results into a subfolder

This commit is contained in:
Jan Nicklas 2016-03-21 10:27:05 +01:00
parent f616f2e22f
commit 935eefb291
43 changed files with 25 additions and 11 deletions

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,10 +1,12 @@
var AppCachePlugin = require('appcache-webpack-plugin');
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},
@ -28,4 +30,3 @@ module.exports = {
new ExtractTextPlugin('styles.css')
]
};

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,9 +1,11 @@
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

@ -1,8 +1,9 @@
var HtmlWebpackPlugin = require('../..');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

@ -1,9 +1,10 @@
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

@ -1,9 +1,10 @@
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

@ -1,9 +1,10 @@
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,9 +1,10 @@
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,2 +1,2 @@
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-01-20T15:46:57.631Z<h2>Partial</h2>
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-03-21T08:52:41.516Z<h2>Partial</h2>
<img src="0714810ae3fb211173e2964249507195.png"><script src="bundle.js"></script>

View File

@ -1,9 +1,10 @@
var HtmlWebpackPlugin = require('../..');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
module.exports = {
entry: './example.js',
output: {
path: __dirname + '/dist',
path: __dirname + '/dist/webpack-' + webpackMajorVersion,
publicPath: '',
filename: 'bundle.js'
},

View File

@ -16,19 +16,24 @@ var path = require('path');
var webpack = require('webpack');
var rm_rf = require('rimraf');
var fs = require('fs');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
var OUTPUT_DIR = path.join(__dirname, '../dist');
jasmine.getEnv().defaultTimeoutInterval = 5000;
function runExample (exampleName, done) {
var examplePath = path.resolve(__dirname, '..', 'examples', exampleName);
var exampleOutput = path.join(OUTPUT_DIR, exampleName);
var fixturePath = path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion);
// Clear old results
rm_rf(exampleOutput, function () {
var options = require(path.join(examplePath, 'webpack.config.js'));
options.context = examplePath;
options.output.path = exampleOutput;
webpack(options, function (err) {
var dircompare = require('dir-compare');
var res = dircompare.compareSync(path.join(examplePath, 'dist'), exampleOutput, {compareSize: true});
var res = dircompare.compareSync(fixturePath, exampleOutput, {compareSize: true});
res.diffSet.filter(function (diff) {
return diff.state === 'distinct';