Skip to content

Commit 7cf4c6c

Browse files
committed
Merge branch 'yo-office-prerelease' into yo-office
2 parents 1a7bfa9 + eda8569 commit 7cf4c6c

File tree

5 files changed

+162
-159
lines changed

5 files changed

+162
-159
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,34 @@
22

33
Custom functions enable you to add new functions to Excel by defining those functions in JavaScript as part of an add-in. Users within Excel can access custom functions just as they would any native function in Excel, such as `SUM()`.
44

5-
This repository contains the source code used by the [Yo Office generator](https://github.com/OfficeDev/generator-office) when you create a new custom functions project. You can also use this repository as a sample to base your own custom functions project from if you choose not to use the generator. For more detailed information about custom functions in Excel, see the [Custom functions overview](https://docs.microsoft.com/office/dev/add-ins/excel/custom-functions-overview) article in the Office Add-ins documentation or see the [additional resources](#additional-resources) section of this repository.
5+
This repository contains the source code used by the [Yo Office generator](https://github.com/OfficeDev/generator-office) when you create a new custom functions project. You can also use this repository as a sample to base your own custom functions project from if you choose not to use the generator. For more detailed information about custom functions in Excel, see the [Custom functions overview](https://learn.microsoft.com/office/dev/add-ins/excel/custom-functions-overview) article in the Office Add-ins documentation or see the [additional resources](#additional-resources) section of this repository.
66

77
## Debugging custom functions
88

9-
This template supports debugging custom functions from [Visual Studio Code](https://code.visualstudio.com/). For more information see [Custom functions debugging](https://aka.ms/custom-functions-debug). For general information on debugging task panes and other Office Add-in parts, see [Test and debug Office Add-ins](https://docs.microsoft.com/office/dev/add-ins/testing/test-debug-office-add-ins).
9+
This template supports debugging custom functions from [Visual Studio Code](https://code.visualstudio.com/). For more information see [Custom functions debugging](https://aka.ms/custom-functions-debug). For general information on debugging task panes and other Office Add-in parts, see [Test and debug Office Add-ins](https://learn.microsoft.com/office/dev/add-ins/testing/test-debug-office-add-ins).
1010

1111
## Questions and comments
1212

1313
We'd love to get your feedback about this sample. You can send your feedback to us in the *Issues* section of this repository.
1414

15-
Questions about Office Add-ins development in general should be posted to [Microsoft Q&A](https://docs.microsoft.com/answers/questions/185087/questions-about-office-add-ins.html). If your question is about the Office JavaScript APIs, make sure it's tagged with [office-js-dev].
15+
Questions about Office Add-ins development in general should be posted to [Microsoft Q&A](https://learn.microsoft.com/answers/questions/185087/questions-about-office-add-ins.html). If your question is about the Office JavaScript APIs, make sure it's tagged with [office-js-dev].
1616

1717
## Join the Microsoft 365 Developer Program
18+
1819
Get a free sandbox, tools, and other resources you need to build solutions for the Microsoft 365 platform.
20+
1921
- [Free developer sandbox](https://developer.microsoft.com/microsoft-365/dev-program#Subscription) Get a free, renewable 90-day Microsoft 365 E5 developer subscription.
2022
- [Sample data packs](https://developer.microsoft.com/microsoft-365/dev-program#Sample) Automatically configure your sandbox by installing user data and content to help you build your solutions.
2123
- [Access to experts](https://developer.microsoft.com/microsoft-365/dev-program#Experts) Access community events to learn from Microsoft 365 experts.
2224
- [Personalized recommendations](https://developer.microsoft.com/microsoft-365/dev-program#Recommendations) Find developer resources quickly from your personalized dashboard.
2325

2426
## Additional resources
2527

26-
* [Custom functions overview](https://docs.microsoft.com/office/dev/add-ins/excel/custom-functions-overview)
27-
* [Custom functions best practices](https://docs.microsoft.com/office/dev/add-ins/excel/custom-functions-best-practices)
28-
* [Custom functions runtime](https://docs.microsoft.com/office/dev/add-ins/excel/custom-functions-runtime)
29-
* [Office Add-ins documentation](https://docs.microsoft.com/office/dev/add-ins/overview/office-add-ins)
30-
* More Office Add-ins samples at [OfficeDev on Github](https://github.com/officedev)
28+
- [Custom functions overview](https://learn.microsoft.com/office/dev/add-ins/excel/custom-functions-overview)
29+
- [Custom functions best practices](https://learn.microsoft.com/office/dev/add-ins/excel/custom-functions-best-practices)
30+
- [Custom functions runtime](https://learn.microsoft.com/office/dev/add-ins/excel/custom-functions-runtime)
31+
- [Office Add-ins documentation](https://learn.microsoft.com/office/dev/add-ins/overview/office-add-ins)
32+
- More Office Add-ins samples at [OfficeDev on Github](https://github.com/officedev)
3133

3234
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
3335

convertToSingleHost.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ async function removeTestInfraStructure() {
3030
await updateLaunchJsonFile();
3131
// delete this script
3232
await unlinkFileAsync("./convertToSingleHost.js");
33+
await deleteSupportFiles();
3334
}
3435

3536
async function updatePackageJsonFile() {
36-
// update package.json to reflect selected host
3737
const packageJson = `./package.json`;
3838
const data = await readFileAsync(packageJson, "utf8");
3939
let content = JSON.parse(data);
4040

41-
// remove scripts that are unrelated to the selected host
41+
// remove scripts that are unrelated to testing or this file
4242
Object.keys(content.scripts).forEach(function (key) {
43-
if (key === "convert-to-single-host" || key === "test") {
43+
if (key === "convert-to-single-host" || key.includes("test")) {
4444
delete content.scripts[key];
4545
}
4646
});
@@ -68,7 +68,7 @@ async function updateLaunchJsonFile() {
6868
function deleteFolder(folder) {
6969
try {
7070
if (fs.existsSync(folder)) {
71-
fs.readdirSync(folder).forEach(function (file, index) {
71+
fs.readdirSync(folder).forEach(function (file) {
7272
const curPath = `${folder}/${file}`;
7373

7474
if (fs.lstatSync(curPath).isDirectory()) {
@@ -84,8 +84,17 @@ function deleteFolder(folder) {
8484
}
8585
}
8686

87+
async function deleteSupportFiles() {
88+
await unlinkFileAsync("CONTRIBUTING.md");
89+
await unlinkFileAsync("LICENSE");
90+
await unlinkFileAsync("README.md");
91+
await unlinkFileAsync("SECURITY.md");
92+
await unlinkFileAsync(".npmrc");
93+
await unlinkFileAsync("package-lock.json");
94+
}
95+
8796
/**
88-
* Remove test infrastructure from project.
97+
* Remove test infrastructure and repo support files from project.
8998
*/
9099
removeTestInfraStructure().catch((err) => {
91100
console.error(`Error: ${err instanceof Error ? err.message : err}`);

0 commit comments

Comments
 (0)