diff --git a/example/multiple/package.json b/example/multiple/package.json new file mode 100644 index 00000000..f8bddf47 --- /dev/null +++ b/example/multiple/package.json @@ -0,0 +1,10 @@ +{ + "name": "favicons-multiple-example", + "version": "1.0.0", + "description": "Demo of favicons webpack plugin", + "scripts": { + }, + "keywords": [], + "author": "", + "license": "MIT" +} diff --git a/example/multiple/src/app.js b/example/multiple/src/app.js new file mode 100644 index 00000000..e69de29b diff --git a/example/multiple/src/favicon.png b/example/multiple/src/favicon.png new file mode 100644 index 00000000..0d393c5a Binary files /dev/null and b/example/multiple/src/favicon.png differ diff --git a/example/multiple/src/favicon.svg b/example/multiple/src/favicon.svg new file mode 100644 index 00000000..484fd764 --- /dev/null +++ b/example/multiple/src/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/example/multiple/src/index.html b/example/multiple/src/index.html new file mode 100644 index 00000000..0cdd1b18 --- /dev/null +++ b/example/multiple/src/index.html @@ -0,0 +1,14 @@ + + + + + + + + Home + + + + + + \ No newline at end of file diff --git a/example/multiple/webpack.config.js b/example/multiple/webpack.config.js new file mode 100644 index 00000000..5a0cc5b2 --- /dev/null +++ b/example/multiple/webpack.config.js @@ -0,0 +1,51 @@ +const { resolve } = require('path'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const FaviconsWebpackPlugin = require('../../src/'); + +const webpack = require('webpack'); + +module.exports = (env, args) => { + return { + context: __dirname, + entry: './src/app.js', + output: { + path: resolve(__dirname, 'public'), + filename: 'app.js', + }, + plugins: [ + new HtmlWebpackPlugin({ + filename: 'index.html', + template: './src/index.html', + }), + new FaviconsWebpackPlugin({ + logo: './src/favicon.png', + favicons: { + icons: { + favicons: true, + android: false, + appleIcon: false, + appleStartup: false, + windows: false, + yandex: false, + }, + } + }), + new FaviconsWebpackPlugin({ + logo: './src/favicon.svg', + prefix: 'assets2/', + outputPath: 'assets2/', + favicons: { + icons: { + favicons: false, + android: false, + appleIcon: true, + appleStartup: false, + windows: false, + yandex: false, + }, + } + }), + ], + stats: "errors-only" + }; +}