Update dependencies

This commit is contained in:
Jan Nicklas 2016-07-02 12:51:07 +02:00
parent 2f2c88bbdb
commit 8fbbf69e50
16 changed files with 38 additions and 20 deletions

View File

@ -1,6 +1,10 @@
Change History
==============
v2.22.0
---
* Update dependencies
v2.21.1
---
* Better error handling (#354)

View File

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

View File

@ -9,7 +9,7 @@ var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
var fs = require('fs');
var path = require('path');
var execSync = require('child_process').execSync;
var rm_rf = require('rimraf');
var rimraf = require('rimraf');
var webpackBin = path.resolve(__dirname, '..', 'node_modules', '.bin', 'webpack');
var examples = fs.readdirSync(__dirname).filter(function (file) {
@ -19,6 +19,6 @@ var examples = fs.readdirSync(__dirname).filter(function (file) {
examples.forEach(function (exampleName) {
var examplePath = path.join(__dirname, exampleName);
var configFile = path.join(examplePath, 'webpack.config.js');
rm_rf.sync(path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion));
rimraf.sync(path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion));
execSync(webpackBin + ' --context "' + examplePath + '" --config "' + configFile + '"');
});

View File

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

View File

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

View File

@ -1,10 +1,11 @@
var path = require('path');
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/webpack-' + webpackMajorVersion,
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
publicPath: '',
filename: 'bundle.js'
},

View File

@ -1,10 +1,11 @@
var path = require('path');
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/webpack-' + webpackMajorVersion,
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
publicPath: '',
filename: 'bundle.js'
},

View File

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

View File

@ -1,10 +1,11 @@
var path = require('path');
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/webpack-' + webpackMajorVersion,
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
publicPath: '',
filename: 'bundle.js'
},

View File

@ -1,10 +1,11 @@
var path = require('path');
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/webpack-' + webpackMajorVersion,
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
publicPath: '',
filename: 'bundle.js'
},

View File

@ -1,10 +1,11 @@
var path = require('path');
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/webpack-' + webpackMajorVersion,
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
publicPath: '',
filename: 'bundle.js'
},

View File

@ -12,7 +12,7 @@ Promise.promisifyAll(fs);
function HtmlWebpackPlugin (options) {
// Default options
this.options = _.extend({
template: __dirname + '/default_index.ejs',
template: path.join(__dirname, 'default_index.ejs'),
filename: 'index.html',
hash: false,
inject: true,
@ -592,7 +592,7 @@ HtmlWebpackPlugin.prototype.getFullTemplatePath = function (template, context) {
}
// Resolve template path
return template.replace(
/(\!)([^\/\\][^\!\?]+|[^\/\\!?])($|\?.+$)/,
/([!])([^\/\\][^!\?]+|[^\/\\!?])($|\?.+$)/,
function (match, prefix, filepath, postfix) {
return prefix + path.resolve(filepath) + postfix;
});

View File

@ -1,6 +1,6 @@
{
"name": "html-webpack-plugin",
"version": "2.21.1",
"version": "2.22.0",
"description": "Simplifies creation of HTML files to serve your webpack bundles",
"main": "index.js",
"files": [
@ -30,6 +30,11 @@
"url": "https://github.com/ampedandwired/html-webpack-plugin/issues"
},
"homepage": "https://github.com/ampedandwired/html-webpack-plugin",
"semistandard": {
"ignore": [
"examples/*/dist/**/*.*"
]
},
"devDependencies": {
"appcache-webpack-plugin": "^1.2.1",
"css-loader": "^0.23.1",

View File

@ -14,7 +14,7 @@ if (!global.Promise) {
var path = require('path');
var fs = require('fs');
var webpack = require('webpack');
var rm_rf = require('rimraf');
var rimraf = require('rimraf');
var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
var HtmlWebpackPlugin = require('../index.js');
@ -88,7 +88,7 @@ function getChunksInfoFromStats (stats) {
describe('HtmlWebpackPlugin', function () {
beforeEach(function (done) {
rm_rf(OUTPUT_DIR, done);
rimraf(OUTPUT_DIR, done);
});
it('generates a default index.html file for a single entry point', function (done) {

View File

@ -12,7 +12,7 @@ if (!global.Promise) {
var path = require('path');
var webpack = require('webpack');
var rm_rf = require('rimraf');
var rimraf = require('rimraf');
var WebpackRecompilationSimulator = require('webpack-recompilation-simulator');
var HtmlWebpackPlugin = require('../index.js');
@ -43,7 +43,7 @@ function getCompiledModuleCount (statsJson) {
describe('HtmlWebpackPluginCaching', function () {
beforeEach(function (done) {
rm_rf(OUTPUT_DIR, done);
rimraf(OUTPUT_DIR, done);
});
it('should compile nothing if no file was changed', function (done) {

View File

@ -14,7 +14,7 @@ if (!global.Promise) {
var path = require('path');
var webpack = require('webpack');
var rm_rf = require('rimraf');
var rimraf = require('rimraf');
var fs = require('fs');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
@ -27,7 +27,7 @@ function runExample (exampleName, done) {
var exampleOutput = path.join(OUTPUT_DIR, exampleName);
var fixturePath = path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion);
// Clear old results
rm_rf(exampleOutput, function () {
rimraf(exampleOutput, function () {
var options = require(path.join(examplePath, 'webpack.config.js'));
options.context = examplePath;
options.output.path = exampleOutput;