Skip to content

Commit 12f2748

Browse files
authored
Merge pull request #415 from OfficeDev/user/millerds/make-non-shared-runtime
Revert changes back to non shared runtime versions.
2 parents 1f5ec08 + 7671007 commit 12f2748

File tree

7 files changed

+127
-31
lines changed

7 files changed

+127
-31
lines changed

manifest.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
55
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
6-
<Id>19791936-c8fa-48c9-a354-e347c71ae827</Id>
6+
<Id>ca968be6-628b-4f14-ba3c-3e614effa9bd</Id>
77
<Version>1.0.0.0</Version>
88
<ProviderName>Contoso</ProviderName>
99
<DefaultLocale>en-US</DefaultLocale>
10-
<DisplayName DefaultValue="Excel Custom Functions Shared Runtime" />
10+
<DisplayName DefaultValue="Excel Custom Functions" />
1111
<Description DefaultValue="Write your own Excel functions in TypeScript." />
1212
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
1313
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
@@ -20,7 +20,7 @@
2020
</Hosts>
2121
<Requirements>
2222
<Sets DefaultMinVersion="1.1">
23-
<Set Name="SharedRuntime" MinVersion="1.1"/>
23+
<Set Name="CustomFunctionsRuntime" MinVersion="1.1"/>
2424
</Sets>
2525
</Requirements>
2626
<DefaultSettings>
@@ -30,16 +30,13 @@
3030
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
3131
<Hosts>
3232
<Host xsi:type="Workbook">
33-
<Runtimes>
34-
<Runtime resid="Taskpane.Url" lifetime="long" />
35-
</Runtimes>
3633
<AllFormFactors>
3734
<ExtensionPoint xsi:type="CustomFunctions">
3835
<Script>
3936
<SourceLocation resid="Functions.Script.Url" />
4037
</Script>
4138
<Page>
42-
<SourceLocation resid="Taskpane.Url"/>
39+
<SourceLocation resid="Functions.Page.Url"/>
4340
</Page>
4441
<Metadata>
4542
<SourceLocation resid="Functions.Metadata.Url" />
@@ -53,7 +50,7 @@
5350
<Description resid="GetStarted.Description"/>
5451
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
5552
</GetStarted>
56-
<FunctionFile resid="Taskpane.Url"/>
53+
<FunctionFile resid="Commands.Url" />
5754
<ExtensionPoint xsi:type="PrimaryCommandSurface">
5855
<OfficeTab id="TabHome">
5956
<Group id="CommandsGroup">
@@ -92,10 +89,12 @@
9289
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
9390
</bt:Images>
9491
<bt:Urls>
95-
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/functions.js" />
96-
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/functions.json" />
92+
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/public/functions.js" />
93+
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/public/functions.json" />
94+
<bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3000/public/functions.html" />
9795
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
98-
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
96+
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
97+
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
9998
</bt:Urls>
10099
<bt:ShortStrings>
101100
<bt:String id="Functions.Namespace" DefaultValue="CONTOSO" />
@@ -109,4 +108,4 @@
109108
</bt:LongStrings>
110109
</Resources>
111110
</VersionOverrides>
112-
</OfficeApp>
111+
</OfficeApp>

src/commands/commands.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->
2+
3+
<!DOCTYPE html>
4+
<html>
5+
6+
<head>
7+
<meta charset="UTF-8" />
8+
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
9+
10+
<!-- Office JavaScript API -->
11+
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
12+
</head>
13+
14+
<body>
15+
16+
</body>
17+
18+
</html>

src/functions/functions.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->
2+
3+
<!DOCTYPE html>
4+
<html>
5+
6+
<head>
7+
<meta charset="UTF-8" />
8+
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
9+
<meta http-equiv="Expires" content="0" />
10+
<title></title>
11+
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/custom-functions-runtime.js" type="text/javascript"></script>
12+
</head>
13+
14+
<body>
15+
16+
</body>
17+
18+
</html>

test/end-to-end/test-manifest-debugging.xml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Version>1.0.0.0</Version>
88
<ProviderName>Contoso</ProviderName>
99
<DefaultLocale>en-US</DefaultLocale>
10-
<DisplayName DefaultValue="Excel Custom Functions Shared Runtime"/>
10+
<DisplayName DefaultValue="Excel Custom Functions"/>
1111
<Description DefaultValue="Write your own Excel functions in TypeScript."/>
1212
<IconUrl DefaultValue="https://localhost:3001/assets/icon-32.png"/>
1313
<HighResolutionIconUrl DefaultValue="https://localhost:3001/assets/icon-64.png"/>
@@ -20,7 +20,7 @@
2020
</Hosts>
2121
<Requirements>
2222
<Sets DefaultMinVersion="1.1">
23-
<Set Name="SharedRuntime" MinVersion="1.1"/>
23+
<Set Name="CustomFunctionsRuntime" MinVersion="1.1"/>
2424
</Sets>
2525
</Requirements>
2626
<DefaultSettings>
@@ -30,9 +30,6 @@
3030
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
3131
<Hosts>
3232
<Host xsi:type="Workbook">
33-
<Runtimes>
34-
<Runtime resid="Taskpane.Url" lifetime="long" />
35-
</Runtimes>
3633
<AllFormFactors>
3734
<ExtensionPoint xsi:type="CustomFunctions">
3835
<Script>
@@ -47,6 +44,42 @@
4744
<Namespace resid="Functions.Namespace"/>
4845
</ExtensionPoint>
4946
</AllFormFactors>
47+
<DesktopFormFactor>
48+
<GetStarted>
49+
<Title resid="GetStarted.Title"/>
50+
<Description resid="GetStarted.Description"/>
51+
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
52+
</GetStarted>
53+
<FunctionFile resid="Commands.Url" />
54+
<ExtensionPoint xsi:type="PrimaryCommandSurface">
55+
<OfficeTab id="TabHome">
56+
<Group id="CommandsGroup">
57+
<Label resid="CommandsGroup.Label" />
58+
<Icon>
59+
<bt:Image size="16" resid="Icon.16x16" />
60+
<bt:Image size="32" resid="Icon.32x32" />
61+
<bt:Image size="80" resid="Icon.80x80" />
62+
</Icon>
63+
<Control xsi:type="Button" id="TaskpaneButton">
64+
<Label resid="TaskpaneButton.Label" />
65+
<Supertip>
66+
<Title resid="TaskpaneButton.Label" />
67+
<Description resid="TaskpaneButton.Tooltip" />
68+
</Supertip>
69+
<Icon>
70+
<bt:Image size="16" resid="Icon.16x16" />
71+
<bt:Image size="32" resid="Icon.32x32" />
72+
<bt:Image size="80" resid="Icon.80x80" />
73+
</Icon>
74+
<Action xsi:type="ShowTaskpane">
75+
<TaskpaneId>ButtonId1</TaskpaneId>
76+
<SourceLocation resid="Taskpane.Url" />
77+
</Action>
78+
</Control>
79+
</Group>
80+
</OfficeTab>
81+
</ExtensionPoint>
82+
</DesktopFormFactor>
5083
</Host>
5184
</Hosts>
5285
<Resources>
@@ -56,10 +89,11 @@
5689
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3001/assets/icon-80.png"/>
5790
</bt:Images>
5891
<bt:Urls>
59-
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3001/functions.js"/>
60-
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3001/functions.json"/>
61-
<bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3001/taskpane.html"/>
92+
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3001/public/functions.js"/>
93+
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3001/public/functions.json"/>
94+
<bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3001/public/functions.html"/>
6295
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
96+
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3001/commands.html"/>
6397
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3001/taskpane.html"/>
6498
</bt:Urls>
6599
<bt:ShortStrings>

test/end-to-end/test-manifest.xml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Version>1.0.0.0</Version>
88
<ProviderName>Contoso</ProviderName>
99
<DefaultLocale>en-US</DefaultLocale>
10-
<DisplayName DefaultValue="Excel Custom Functions Shared Runtime"/>
10+
<DisplayName DefaultValue="Excel Custom Functions"/>
1111
<Description DefaultValue="Write your own Excel functions in TypeScript."/>
1212
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
1313
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
@@ -20,7 +20,7 @@
2020
</Hosts>
2121
<Requirements>
2222
<Sets DefaultMinVersion="1.1">
23-
<Set Name="SharedRuntime" MinVersion="1.1"/>
23+
<Set Name="CustomFunctionsRuntime" MinVersion="1.1"/>
2424
</Sets>
2525
</Requirements>
2626
<DefaultSettings>
@@ -30,16 +30,13 @@
3030
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
3131
<Hosts>
3232
<Host xsi:type="Workbook">
33-
<Runtimes>
34-
<Runtime resid="Taskpane.Url" lifetime="long" />
35-
</Runtimes>
3633
<AllFormFactors>
3734
<ExtensionPoint xsi:type="CustomFunctions">
3835
<Script>
3936
<SourceLocation resid="Functions.Script.Url"/>
4037
</Script>
4138
<Page>
42-
<SourceLocation resid="Taskpane.Url"/>
39+
<SourceLocation resid="Functions.Page.Url"/>
4340
</Page>
4441
<Metadata>
4542
<SourceLocation resid="Functions.Metadata.Url"/>
@@ -56,9 +53,11 @@
5653
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
5754
</bt:Images>
5855
<bt:Urls>
59-
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/functions.js"/>
60-
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/functions.json"/>
56+
<bt:Url id="Functions.Script.Url" DefaultValue="https://localhost:3000/public/functions.js"/>
57+
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/public/functions.json"/>
58+
<bt:Url id="Functions.Page.Url" DefaultValue="https://localhost:3000/public/functions.html"/>
6159
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
60+
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
6261
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
6362
</bt:Urls>
6463
<bt:ShortStrings>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,20 @@ module.exports = async (env, options) => {
7171
output: "functions.json",
7272
input: "./src/functions/functions.ts",
7373
}),
74+
new HtmlWebpackPlugin({
75+
filename: "functions.html",
76+
template: "./src/functions/functions.html",
77+
chunks: ["polyfill", "functions"],
78+
}),
7479
new HtmlWebpackPlugin({
7580
filename: "taskpane.html",
7681
template: "./test/end-to-end/src/test-taskpane.html",
77-
chunks: ["polyfill", "taskpane", "functions", "commands"],
82+
chunks: ["polyfill", "taskpane"],
83+
}),
84+
new HtmlWebpackPlugin({
85+
filename: "commands.html",
86+
template: "./test/end-to-end/src/test-commands.html",
87+
chunks: ["polyfill", "commands"],
7888
}),
7989
new CopyWebpackPlugin({
8090
patterns: [
@@ -86,6 +96,10 @@ module.exports = async (env, options) => {
8696
}),
8797
],
8898
devServer: {
99+
static: {
100+
directory: path.resolve("./", "dist"),
101+
publicPath: "/public",
102+
},
89103
headers: {
90104
"Access-Control-Allow-Origin": "*",
91105
},

webpack.config.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,15 @@ module.exports = async (env, options) => {
6363
output: "functions.json",
6464
input: "./src/functions/functions.ts",
6565
}),
66+
new HtmlWebpackPlugin({
67+
filename: "functions.html",
68+
template: "./src/functions/functions.html",
69+
chunks: ["polyfill", "functions"],
70+
}),
6671
new HtmlWebpackPlugin({
6772
filename: "taskpane.html",
6873
template: "./src/taskpane/taskpane.html",
69-
chunks: ["polyfill", "taskpane", "functions", "commands"],
74+
chunks: ["polyfill", "taskpane"],
7075
}),
7176
new CopyWebpackPlugin({
7277
patterns: [
@@ -81,14 +86,23 @@ module.exports = async (env, options) => {
8186
if (dev) {
8287
return content;
8388
} else {
84-
return content.toString().replace(urlDev, urlProd);
89+
return content.toString().replace(new RegExp(urlDev + "(?:public/)?", "g"), urlProd);
8590
}
8691
},
8792
},
8893
],
8994
}),
95+
new HtmlWebpackPlugin({
96+
filename: "commands.html",
97+
template: "./src/commands/commands.html",
98+
chunks: ["polyfill", "commands"],
99+
}),
90100
],
91101
devServer: {
102+
static: {
103+
directory: path.join(__dirname, "dist"),
104+
publicPath: "/public",
105+
},
92106
headers: {
93107
"Access-Control-Allow-Origin": "*",
94108
},

0 commit comments

Comments
 (0)