Skip to content

Commit a829a2d

Browse files
authored
Merge pull request #778 from millerds/update-template-options
Update template options
2 parents 9c2be4b + a89a692 commit a829a2d

File tree

4 files changed

+2
-89
lines changed

4 files changed

+2
-89
lines changed

readme.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ This [Yeoman](http://yeoman.io) generator creates a Node.js [Office Add-in](http
1414

1515
In addition you can use it to create add-ins that use single sign-on or Excel custom functions.
1616

17-
Like other Yeoman generators, this generator simply creates the scaffolding of files for your Office Add-in project. You can choose to create Office Add-in projects using plain HTML, CSS & JavaScript, or using Angular or React, and can choose between JavaScript and Typescript as well.
17+
Like other Yeoman generators, this generator simply creates the scaffolding of files for your Office Add-in project. You can choose to create Office Add-in projects using plain HTML, CSS & JavaScript, or using React, and can choose between JavaScript and Typescript as well.
1818

1919
> **Note:** While you can also use [Visual Studio](https://visualstudio.microsoft.com/vs) to create Office Add-in projects, the Yeoman generator provides more options in terms of the types of projects you can create. For example:
2020
>
21-
> - The Yeoman generator can create Office Add-in projects that use plain HTML, CSS & JavaScript, or React, or Angular; whereas Visual Studio can only create Office Add-in projects that use plain HTML, CSS & JavaScript.
21+
> - The Yeoman generator can create Office Add-in projects that use plain HTML, CSS & JavaScript, or React; whereas Visual Studio can only create Office Add-in projects that use plain HTML, CSS & JavaScript.
2222
> - The Yeoman generator can create Office Add-ins projects that use either JavaScript or TypeScript; whereas Visual Studio only creates JavaScript projects which you would need to convert manually if you want to use TypeScript.
2323
> - The Yeoman generator can create add-ins for Excel, OneNote, Outlook, PowerPoint, Project, and Word; whereas Visual Studio can only create add-ins for Excel, Outlook, PowerPoint, and Word.
2424
@@ -61,7 +61,6 @@ Specifies the project type to create.
6161
Project Type | Description
6262
----------- | ------------------------
6363
taskpane | Task Pane add-in using HTML
64-
angular | Task Pane add-in using the Angular framework
6564
react | Task Pane add-in using the React framework
6665
excel-functions | Task Pane add-in with Excel Custom Functions
6766
single-sign-on | Taskpane add-in supporting single-sign-on

src/app/config/projectProperties.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,6 @@
4747
"Word"
4848
]
4949
},
50-
"angular": {
51-
"displayname": "Office Add-in Task Pane project using Angular framework",
52-
"manifestPath": "manifest.xml",
53-
"templates": {
54-
"javascript": {
55-
"repository": "https://github.com/OfficeDev/Office-Addin-TaskPane-Angular-JS",
56-
"branch": "yo-office",
57-
"prerelease": "yo-office-prerelease"
58-
},
59-
"typescript": {
60-
"repository": "https://github.com/OfficeDev/Office-Addin-TaskPane-Angular",
61-
"branch": "yo-office",
62-
"prerelease": "yo-office-prerelease"
63-
}
64-
},
65-
"supportedHosts": [
66-
"Excel",
67-
"Onenote",
68-
"Outlook",
69-
"Powerpoint",
70-
"Project",
71-
"Word"
72-
]
73-
},
7450
"excel-functions-shared": {
7551
"displayname": "Excel Custom Functions using a Shared Runtime",
7652
"manifestPath": "manifest.xml",

src/app/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ module.exports = class extends yo {
422422
this.log(`\nYo Office ${chalk.bgGreen('Arguments')} and ${chalk.bgMagenta('Options.')}\n`);
423423
this.log(`NOTE: ${chalk.bgGreen('Arguments')} must be specified in the order below, and ${chalk.bgMagenta('Options')} must follow ${chalk.bgGreen('Arguments')}.\n`);
424424
this.log(` ${chalk.bgGreen('projectType')}:Specifies the type of project to create. Valid project types include:`);
425-
this.log(` ${chalk.yellow('angular:')} Creates an Office add-in using Angular framework.`);
426425
this.log(` ${chalk.yellow('excel-functions-shared:')} Creates an Office add-in for Excel custom functions using a Shared Runtime.`);
427426
this.log(` ${chalk.yellow('excel-functions:')} Creates an Office add-in for Excel custom functions using a JavaScript-only Runtime.`);
428427
this.log(` ${chalk.yellow('jquery:')} Creates an Office add-in using Jquery framework.`);

src/test/convert-to-single-host.ts

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -85,67 +85,6 @@ describe('Office-Add-Taskpane-Ts projects', () => {
8585
});
8686
});
8787

88-
// Test to verify converting a project to a single host
89-
// for Angular JavaScript project using Word host
90-
describe('Office-Add-Taskpane-Angular-Js project', () => {
91-
const expectedFiles = [
92-
packageJsonFile,
93-
manifestFile,
94-
'src/taskpane/app/app.component.js',
95-
]
96-
const unexpectedFiles = [
97-
'src/taskpane/app/excel.app.component.js',
98-
'src/taskpane/app/onenote.app.component.js',
99-
'src/taskpane/app/outlook.app.component.js',
100-
'src/taskpane/app/powerpoint.app.component.js',
101-
'src/taskpane/app/project.app.component.js',
102-
'src/taskpane/app/word.app.component.js',
103-
]
104-
const answers = {
105-
projectType: "angular",
106-
scriptType: "JavaScript",
107-
name: "AngularProject",
108-
host: hosts[5]
109-
};
110-
111-
describe('Office-Add-Taskpane project', () => {
112-
before((done) => {
113-
helpers.run(path.join(__dirname, '../app')).withOptions({ 'test': true }).withPrompts(answers).on('end', done);
114-
});
115-
116-
it('creates expected files', (done) => {
117-
assert.file(expectedFiles);
118-
assert.noFile(unexpectedFiles);
119-
assert.noFile(unexpectedManifestFiles);
120-
done();
121-
});
122-
});
123-
124-
describe('Package.json is updated appropriately', () => {
125-
it('Package.json is updated properly', async () => {
126-
const data: string = await readFileAsync(packageJsonFile, 'utf8');
127-
const content = JSON.parse(data);
128-
assert.equal(content.config["app_to_debug"], hosts[5]);
129-
130-
// Verify host-specific sideload and unload sripts have been removed
131-
let unexexpectedScriptsFound = false;
132-
Object.keys(content.scripts).forEach(function (key) {
133-
if (key.includes("sideload:") || key.includes("unload:")) {
134-
unexexpectedScriptsFound = true;
135-
}
136-
});
137-
assert.equal(unexexpectedScriptsFound, false);
138-
});
139-
});
140-
141-
describe('Manifest.xml is updated appropriately', () => {
142-
it('Manifest.xml is updated appropriately', async () => {
143-
const manifestInfo = await OfficeAddinManifest.readManifestFile(manifestFile);
144-
assert.equal(manifestInfo.hosts, "Document");
145-
});
146-
});
147-
});
148-
14988
// Test to verify converting a project to a single host
15089
// for React Typescript project using PowerPoint host
15190
describe('Office-Add-Taskpane-React-Ts project', () => {

0 commit comments

Comments
 (0)