Skip to content

Commit

Permalink
Pre validator release (#234)
Browse files Browse the repository at this point in the history
* Include validator package. Update docs to refer to validator.
  • Loading branch information
beth-panx authored Mar 30, 2017
1 parent 0cab043 commit 50116e4
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 513 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"tsc-watch": "tsc -p tsconfig.json -w",
"start": "rimraf generators && concurrently \"npm run tsc-watch\" \"npm run copy-watch\"",
"build": "rimraf generators && concurrently \"npm run tsc\" \"npm run copy\"",
"test": "mocha -r ts-node/register generators/test/**.js"
"test": "mocha -r ts-node/register generators/test/**.js",
"postinstall": "npm i -g office-addin-validator"
},
"engines": {
"node": ">6.9.0"
Expand Down
9 changes: 8 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ Browse to the 'External' IP address listed in your console to test your web app

## Validate manifest.xml

Refer to the docs on [add-in manifests](https://dev.office.com/docs/add-ins/overview/add-in-manifests) for information on manifest validation.
As you modify your `manifest.xml` file, use the included [Office Add-in Validator](https://github.com/OfficeDev/office-addin-validator) to ensure that your XML file is correct and complete. It will also give you information on against what platforms to test your add-ins before submitting to the store.

To run Office Add-in Validator, type the following command in your console:
```bash
$ validate-office-addin your_manifest.xml
```

For more information on manifest validation, refer to our [add-in manifests documentation](https://dev.office.com/docs/add-ins/overview/add-in-manifests).

## Command Line Arguments:
List of supported arguments. The generator will prompt you accordingly based on the arguments you provided.
Expand Down
4 changes: 3 additions & 1 deletion src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ module.exports = yo.extend({
}
else {
/** Copy the base template */
this.fs.copy(this.templatePath(`${language}/base/**`), this.destinationPath());
this.fs.copyTpl(this.templatePath(`${language}/base/**`), this.destinationPath(), this.project);

/** Copy the framework specific overrides */
this.fs.copyTpl(this.templatePath(`${language}/${this.project.framework}/**`), this.destinationPath(), this.project);
Expand Down Expand Up @@ -333,6 +333,8 @@ module.exports = yo.extend({
this.log(` 1. Launch your local web server via ${chalk.inverse(' npm start ')} (you may also need to`);
this.log(` trust the Self-Signed Certificate for the site if you haven't done that)`);
this.log(` 2. Sideload the add-in into your Office application.\n`);
this.log(` Please refer to resource.html in your project for more information.`);
this.log(` Or visit our repo at: https://github.com/officeDev/generator-office`);
this.log('----------------------------------------------------------------------------------------------------------\n');
this._exitProcess();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
<h1>Hey, <%= projectDisplayName %> is ready!</h1>
<p>Next steps:</p>

<pre>1. Host the website.
<pre>1. Host the add-in website.

2. Sideload your add-in.

3. Use the <a target="_blank" href="https://dev.office.com/reference/add-ins/javascript-api-for-office" onclick="appInsights.trackEvent('linkClick_office-javascript-apis');return true;">Office JavaScript APIs</a> to create rich interactions with <%= host %>.</pre>
3. Build your <%= host %> Add-in using the <a target="_blank" href="https://dev.office.com/reference/add-ins/javascript-api-for-office" onclick="appInsights.trackEvent('linkClick_office-javascript-apis');return true;">Office JavaScript APIs</a>.</pre>

<p>For more information, choose <b>Next</b>.</p>
<p>You can also explore the links in the additional resources section.</p>
</section>
</article>
<article class="slide">
<h1>Hosting</h1>
<h1>Host</h1>
<!--<p>Follow through the next steps or click on the additional resources to help you get started.</p>-->
<p>You can host your add-in locally or use any web server. Make sure that the add-in is served using HTTPS and
also update the add-in’s source location in the manifest. </p>
Expand All @@ -51,10 +51,10 @@ <h1>Hosting</h1>
<a target="_blank" href="https://localhost:3000">https://localhost:3000</a></pre>

<p>
See <a target="_blank" href="https://github.com/OfficeDev/generator-office/blob/beta/src/docs/ssl.md" onclick="appInsights.trackEvent('linkClick_ssl');return true;">our documentation</a> for information about adding the self-signed certificates.</p>
See <a target="_blank" href="https://github.com/OfficeDev/generator-office/blob/master/src/docs/ssl.md" onclick="appInsights.trackEvent('linkClick_ssl');return true;">our documentation</a> for information about adding the self-signed certificates.</p>
</article>
<article class="slide">
<h1>Sideloading</h1>
<h1>Sideload</h1>
<% if (host === 'Outlook') { %>
<%# Outlook-specific steps go here %>
<p>Load the add-in into <%= host %>. The easiest way to do this is by sideloading the add-in using the in-client Office Store UI.</p>
Expand Down Expand Up @@ -99,14 +99,16 @@ <h1>Sideloading</h1>
</article>
<article class="slide">
<section class="text">
<h1>Tips</h1>
<h1>Build</h1>
<p>Here's some advice for building a stellar add-in:</p>

<pre>● Use the <a target="_blank" href="https://dev.office.com/docs/add-ins/design/ux-design-patterns" onclick="appInsights.trackEvent('linkClick_design-patterns');return true;">Design Patterns</a> to create a rich and immersive UI.

● Use the <a target="_blank" href="https://github.com/officedev/office-js-helpers" onclick="appInsights.trackEvent('linkClick_office-js-helpers');return true;">Office Helpers</a> to simplify Authentication, Storage management etc.

● Ensure your add-in works on all browsers and platforms that <a target="_blank" href="https://dev.office.com/add-in-availability" onclick="appInsights.trackEvent('linkClick_office-supports');return true;">Office supports</a>.</pre>
● Use the included <a target="_blank" href="https://github.com/officedev/office-addin-validator" onclick="appInsights.trackEvent('linkClick_office-addin-validator');return true;">Office Add-in Validator</a> to ensure your manifest.xml file is correct and complete. It will also give you information on against what platforms to test your add-in before submitting to the store.
<span class="comment"># Type the following command in your console to validate your manifest:</span>
$ validate-office-addin <%= projectInternalName %>-manifest.xml</pre>

<p> For more information and resources to help you develop your add-in project, follow through the next steps
or click on the additional resources to help you get started.</p>
Expand Down
22 changes: 12 additions & 10 deletions src/app/templates/manifest-only/resource.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
<h1>Hey, <%= projectDisplayName %> is ready!</h1>
<p>Next steps:</p>

<pre>1. Host the website.
<pre>1. Host the add-in website.

2. Sideload your add-in.

3. Use the <a target="_blank" href="https://dev.office.com/reference/add-ins/javascript-api-for-office" onclick="appInsights.trackEvent('linkClick_javascript-api-for-office');return true;">Office JavaScript APIs</a> to create rich interactions with <%= host %>.</pre>
3. Build your <%= host %> Add-in using the <a target="_blank" href="https://dev.office.com/reference/add-ins/javascript-api-for-office" onclick="appInsights.trackEvent('linkClick_office-javascript-apis');return true;">Office JavaScript APIs</a>.</pre>

<p>For more information, choose <b>Next</b>.</p>
<p>You can also explore the links in the additional resources section.</p>
</section>
</article>
<article class="slide">
<h1>Hosting</h1>
<h1>Host</h1>
<!--<p>Follow through the next steps or click on the additional resources to help you get started.</p>-->
<p>You can host your add-in locally or use any web server. Make sure that the add-in is served using HTTPS and
also update the add-in’s source location in the manifest. </p>
Expand All @@ -51,10 +51,10 @@ <h1>Hosting</h1>
<a target="_blank" href="https://localhost:3000">https://localhost:3000</a></pre>

<p>
See <a target="_blank" href="https://github.com/OfficeDev/generator-office/blob/beta/src/docs/ssl.md" onclick="appInsights.trackEvent('linkClick_ssl');return true;">our documentation</a> for information about adding the self-signed certificates.</p>
See <a target="_blank" href="https://github.com/OfficeDev/generator-office/blob/master/src/docs/ssl.md" onclick="appInsights.trackEvent('linkClick_ssl');return true;">our documentation</a> for information about adding the self-signed certificates.</p>
</article>
<article class="slide">
<h1>Sideloading</h1>
<h1>Sideload</h1>
<% if (host === 'Outlook') { %>
<%# Outlook-specific steps go here %>
<p>Load the add-in into <%= host %>. The easiest way to do this is by sideloading the add-in using the in-client Office Store UI.</p>
Expand All @@ -73,7 +73,7 @@ <h1>Sideloading</h1>

5. Review the warning prompt and choose <b>Install</b>.

6. Close the Office Store window. Your add-in will load in <a target="_blank" href="https://office.live.com/start/Outlook.aspx?auth=2&nf=1">Outlook</a>.
6. Close the Office Store window. Your add-in will load in <a target="_blank" href="https://office.live.com/start/Outlook.aspx?auth=2&nf=1" onclick="appInsights.trackEvent('linkClick_outlook-sideload');return true;">Outlook</a>.
</pre>
<% } else { %>
<%# Other Office apps steps go here %>
Expand All @@ -99,14 +99,16 @@ <h1>Sideloading</h1>
</article>
<article class="slide">
<section class="text">
<h1>Tips</h1>
<h1>Build</h1>
<p>Here's some advice for building a stellar add-in:</p>

<pre>● Use the <a target="_blank" href="https://dev.office.com/docs/add-ins/design/ux-design-patterns" onclick="appInsights.trackEvent('linkClick_design-pattern');return true;">Design Patterns</a> to create a rich and immersive UI.
<pre>● Use the <a target="_blank" href="https://dev.office.com/docs/add-ins/design/ux-design-patterns" onclick="appInsights.trackEvent('linkClick_design-patterns');return true;">Design Patterns</a> to create a rich and immersive UI.

● Use the <a target="_blank" href="https://github.com/officedev/office-js-helpers" onclick="appInsights.trackEvent('linkClick_office-js-helpers');return true;">Office Helpers</a> to simplify Authentication, Storage management etc.

● Ensure your add-in works on all browsers and platforms that <a target="_blank" href="https://dev.office.com/add-in-availability" onclick="appInsights.trackEvent('linkClick_office-supports');return true;">Office supports</a>.</pre>
● Use the included <a target="_blank" href="https://github.com/officedev/office-addin-validator" onclick="appInsights.trackEvent('linkClick_office-addin-validator');return true;">Office Add-in Validator</a> to ensure your manifest.xml file is correct and complete. It will also give you information on against what platforms to test your add-in before submitting to the store.
<span class="comment"># Type the following command in your console to validate your manifest:</span>
$ validate-office-addin <%= projectInternalName %>-manifest.xml</pre>

<p> For more information and resources to help you develop your add-in project, follow through the next steps
or click on the additional resources to help you get started.</p>
Expand Down Expand Up @@ -151,7 +153,7 @@ <h3>Deploy & Publish</h2>
</main>

<footer>
<p>We would love to hear your <a target="_blank" href="https://github.com/OfficeDev/generator-office/issues/new" onclick="appInsights.trackEvent('linkClick_feedback');return true;">feedback</a>.</p>
<p>We would love to hear your <a target="_blank" href="https://github.com/OfficeDev/generator-office/issues/new" onclick="appInsights.trackEvent('linkClick_feedback');return true;">feedback</a>.</p>
</footer>

<script type="text/javascript">
Expand Down
Loading

0 comments on commit 50116e4

Please sign in to comment.