Skip to content

Commit 04ad32a

Browse files
Trying to fix deploy
1 parent df7de97 commit 04ad32a

File tree

7 files changed

+60
-12
lines changed

7 files changed

+60
-12
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
mkdir docs
3636
npm install --g gh-pages
3737
npm i
38-
npm run build
38+
npm run build:docs
3939
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
4040
npm run deploy -u "github-actions-bot <[email protected]>"
4141
env:

build/webpack.base.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
12
const path = require('path');
23
const { VueLoaderPlugin } = require('vue-loader');
34

build/webpack.dev.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
12
const { merge } = require('webpack-merge');
23
const path = require('path');
34
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');

build/webpack.docs.config.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
2+
const { merge } = require('webpack-merge');
3+
const path = require('path');
4+
const TerserPlugin = require('terser-webpack-plugin');
5+
const HtmlWebpackPlugin = require('html-webpack-plugin');
6+
const base = require('./webpack.base.config');
7+
8+
/*
9+
|--------------------------------------------------------------------------
10+
| HtmlWebpackPlugin Options
11+
|--------------------------------------------------------------------------
12+
*/
13+
const htmlWebpackOptions = {
14+
inject: 'body',
15+
template: '../src/templates/index.html',
16+
title: 'Vue Easter Egg Loader',
17+
};
18+
19+
/*
20+
|--------------------------------------------------------------------------
21+
| Plugins
22+
|--------------------------------------------------------------------------
23+
*/
24+
const plugins = [
25+
new HtmlWebpackPlugin(htmlWebpackOptions),
26+
];
27+
28+
29+
module.exports = merge(base, {
30+
mode: 'production',
31+
context: path.join(__dirname, '../src'),
32+
entry: '../src/main.js',
33+
optimization: {
34+
minimize: true,
35+
minimizer: [
36+
new TerserPlugin({
37+
terserOptions: {
38+
format: {
39+
comments: false,
40+
},
41+
},
42+
extractComments: false,
43+
}),
44+
],
45+
},
46+
output: {
47+
clean: true,
48+
filename: '[name].js',
49+
path: path.resolve(__dirname, '../docs'),
50+
publicPath: '/docs/',
51+
library: 'vue-easter-egg-trigger',
52+
libraryTarget: 'umd',
53+
},
54+
plugins,
55+
});

build/webpack.release.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
12
const { merge } = require('webpack-merge');
23
const TerserPlugin = require('terser-webpack-plugin');
34
const base = require('./webpack.base.config');

build/webpack.test.config.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"dev": "pnpm development",
1111
"development": "cross-env NODE_ENV=development webpack serve --config ./build/webpack.dev.config.js",
1212
"build:release": "webpack --config ./build/webpack.release.config.js --progress",
13+
"build:docs": "webpack --config ./build/webpack.docs.config.js --progress",
1314
"build": "pnpm build:release",
1415
"deploy": "gh-pages -d docs"
1516
},

0 commit comments

Comments
 (0)