Skip to content

Commit 7e90687

Browse files
authored
Merge pull request #293 from millerds/switch-manifest-image-prep
Move manifest image prep from code to webpack
2 parents 5a98a1b + 60b26bc commit 7e90687

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

src/taskpane/taskpane.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
* See LICENSE in the project root for license information.
44
*/
55

6-
// images references in the manifest
7-
/* eslint-disable no-unused-vars */
8-
import icon16 from "../../assets/icon-16.png";
9-
import icon32 from "../../assets/icon-32.png";
10-
import icon64 from "../../assets/icon-64.png";
11-
import icon80 from "../../assets/icon-80.png";
12-
import icon128 from "../../assets/icon-128.png";
13-
/* eslint-enable no-unused-vars */
14-
156
/* global console, document, Excel, Office */
167

178
// The initialize function must be run each time a new page is loaded

test/end-to-end/src/test-taskpane.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ import * as functionsJsonData from "./test-data.json";
22
import { pingTestServer, sendTestResults } from "office-addin-test-helpers";
33
import { closeWorkbook, sleep } from "./test-helpers";
44

5-
// images references in the manifest
6-
/* eslint-disable no-unused-vars */
7-
import icon16 from "../../assets/icon-16.png";
8-
import icon32 from "../../assets/icon-32.png";
9-
import icon64 from "../../assets/icon-64.png";
10-
import icon80 from "../../assets/icon-80.png";
11-
import icon128 from "../../assets/icon-128.png";
12-
/* eslint-enable no-unused-vars */
13-
145
/* global Office, document, Excel, run */
156
const customFunctionsData = (<any>functionsJsonData).functions;
167
const port: number = 4201;

test/end-to-end/webpack.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const devCerts = require("office-addin-dev-certs");
44
const CustomFunctionsMetadataPlugin = require("custom-functions-metadata-plugin");
55
const HtmlWebpackPlugin = require("html-webpack-plugin");
6+
const CopyWebpackPlugin = require("copy-webpack-plugin");
67
const path = require("path");
78

89
/* global require, module, process, __dirname */
@@ -86,6 +87,14 @@ module.exports = async (env, options) => {
8687
template: "./test/end-to-end/src/test-commands.html",
8788
chunks: ["polyfill", "commands"],
8889
}),
90+
new CopyWebpackPlugin({
91+
patterns: [
92+
{
93+
from: "assets/icon-*",
94+
to: "assets/[name][ext][query]",
95+
},
96+
],
97+
}),
8998
],
9099
devServer: {
91100
static: ["./"],

test/unit/images.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ module.exports = async (env, options) => {
8181
}),
8282
new CopyWebpackPlugin({
8383
patterns: [
84+
{
85+
from: "assets/icon-*",
86+
to: "assets/[name][ext][query]",
87+
},
8488
{
8589
from: "manifest*.xml",
8690
to: "[name]." + buildType + "[ext]",

0 commit comments

Comments
 (0)