From 8fbbf69e503ce637c7ac92601afea02caff8ebcb Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Sat, 2 Jul 2016 12:51:07 +0200 Subject: [PATCH] Update dependencies --- CHANGELOG.md | 4 ++++ examples/appcache/webpack.config.js | 3 ++- examples/build-examples.js | 4 ++-- examples/custom-template/webpack.config.js | 3 ++- examples/default/webpack.config.js | 3 ++- examples/favicon/webpack.config.js | 3 ++- examples/html-loader/webpack.config.js | 3 ++- examples/inline/webpack.config.js | 3 ++- examples/jade-loader/webpack.config.js | 3 ++- examples/javascript-advanced/webpack.config.js | 3 ++- examples/javascript/webpack.config.js | 3 ++- index.js | 4 ++-- package.json | 7 ++++++- spec/BasicSpec.js | 4 ++-- spec/CachingSpec.js | 4 ++-- spec/ExampleSpec.js | 4 ++-- 16 files changed, 38 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdb7dc4..6e79e7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Change History ============== +v2.22.0 +--- +* Update dependencies + v2.21.1 --- * Better error handling (#354) diff --git a/examples/appcache/webpack.config.js b/examples/appcache/webpack.config.js index 2d12791..af2147c 100755 --- a/examples/appcache/webpack.config.js +++ b/examples/appcache/webpack.config.js @@ -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' }, diff --git a/examples/build-examples.js b/examples/build-examples.js index 563224c..d4573b3 100644 --- a/examples/build-examples.js +++ b/examples/build-examples.js @@ -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 + '"'); }); diff --git a/examples/custom-template/webpack.config.js b/examples/custom-template/webpack.config.js index d512d4a..4ab3e11 100755 --- a/examples/custom-template/webpack.config.js +++ b/examples/custom-template/webpack.config.js @@ -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' }, diff --git a/examples/default/webpack.config.js b/examples/default/webpack.config.js index 2168e01..ab43eae 100755 --- a/examples/default/webpack.config.js +++ b/examples/default/webpack.config.js @@ -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' }, diff --git a/examples/favicon/webpack.config.js b/examples/favicon/webpack.config.js index ec93c95..5755998 100755 --- a/examples/favicon/webpack.config.js +++ b/examples/favicon/webpack.config.js @@ -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' }, diff --git a/examples/html-loader/webpack.config.js b/examples/html-loader/webpack.config.js index 6d0a435..a522291 100755 --- a/examples/html-loader/webpack.config.js +++ b/examples/html-loader/webpack.config.js @@ -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' }, diff --git a/examples/inline/webpack.config.js b/examples/inline/webpack.config.js index 3063682..d479daf 100755 --- a/examples/inline/webpack.config.js +++ b/examples/inline/webpack.config.js @@ -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' }, diff --git a/examples/jade-loader/webpack.config.js b/examples/jade-loader/webpack.config.js index ed3d56f..5703314 100755 --- a/examples/jade-loader/webpack.config.js +++ b/examples/jade-loader/webpack.config.js @@ -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' }, diff --git a/examples/javascript-advanced/webpack.config.js b/examples/javascript-advanced/webpack.config.js index a964787..965697b 100644 --- a/examples/javascript-advanced/webpack.config.js +++ b/examples/javascript-advanced/webpack.config.js @@ -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' }, diff --git a/examples/javascript/webpack.config.js b/examples/javascript/webpack.config.js index a964787..965697b 100644 --- a/examples/javascript/webpack.config.js +++ b/examples/javascript/webpack.config.js @@ -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' }, diff --git a/index.js b/index.js index 8d5b189..7775c24 100644 --- a/index.js +++ b/index.js @@ -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; }); diff --git a/package.json b/package.json index c897336..ef4bcd4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/spec/BasicSpec.js b/spec/BasicSpec.js index 330bc1d..3ae22a3 100644 --- a/spec/BasicSpec.js +++ b/spec/BasicSpec.js @@ -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) { diff --git a/spec/CachingSpec.js b/spec/CachingSpec.js index 7751a50..c4ab936 100644 --- a/spec/CachingSpec.js +++ b/spec/CachingSpec.js @@ -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) { diff --git a/spec/ExampleSpec.js b/spec/ExampleSpec.js index 29220a2..9032183 100644 --- a/spec/ExampleSpec.js +++ b/spec/ExampleSpec.js @@ -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;