Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewconnell committed Oct 23, 2015
2 parents 9d888ed + 7a2da9b commit 29c466e
Show file tree
Hide file tree
Showing 68 changed files with 793 additions and 165 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -104,9 +104,9 @@ Relative path where the project should be created (blank = current directory). I
- Default: undefined / null
- Optional

### `--tech:[ 'html' | 'ng' | 'manifest-only' ]`
### `--tech:[ 'html' | 'ng' | 'ng-adal' | 'manifest-only' ]`

Technology to use for the project. The supported options include HTML (`html`) or Angular (`ng`). You can also use Manifest.xml only (`manifest-only`) which will create only the `manifest.xml` for an an Office addin.
Technology to use for the project. The supported options include HTML (`html`), Angular (`ng`) or Angular ADAL (`ng-adal`). You can also use Manifest.xml only (`manifest-only`) which will create only the `manifest.xml` for an an Office addin.

- Type: String
- Default: undefined / null
Expand Down
12 changes: 4 additions & 8 deletions docs/adal-config.md
Expand Up @@ -6,13 +6,11 @@ If you want to use ADAL JS in your add-in generated by the Yeoman Office Generat
if (location.href.indexOf('access_token=') < 0) {
Office.initialize = function () {
console.log(">>> Office.initialize()");
angular.bootstrap(jQuery('#container'), ['officeAddin']);
angular.bootstrap(document.getElementById('container'), ['officeAddin']);
};
}
else {
jQuery(function() {
angular.bootstrap(jQuery('#container'), ['officeAddin']);
});
angular.bootstrap(document.getElementById('container'), ['officeAddin']);
}
```

Expand Down Expand Up @@ -56,13 +54,11 @@ In the __app.module.js__ file change how the Angular application is bootstrapped
if (location.href.indexOf('access_token=') < 0) {
Office.initialize = function () {
console.log(">>> Office.initialize()");
angular.bootstrap(jQuery('#container'), ['officeAddin']);
angular.bootstrap(document.getElementById('container'), ['officeAddin']);
};
}
else {
jQuery(function() {
angular.bootstrap(jQuery('#container'), ['officeAddin']);
});
angular.bootstrap(document.getElementById('container'), ['officeAddin']);
}
```

Expand Down
2 changes: 2 additions & 0 deletions docs/example-content-html.md
Expand Up @@ -37,6 +37,7 @@ $ yo office --skip-install
├── images
│   └── close.png
├── manifest.xml
├── manifest.xsd
└── scripts
└── MicrosoftAjax.js
```
Expand Down Expand Up @@ -90,6 +91,7 @@ $ yo office --skip-install
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── package.json
├── tsd.json
└── src
Expand Down
2 changes: 2 additions & 0 deletions docs/example-content-ng.md
Expand Up @@ -26,6 +26,7 @@ $ yo office --skip-install
├── index.html
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── tsd.json
├── app
│   ├── app.module.js
Expand Down Expand Up @@ -92,6 +93,7 @@ $ yo office --skip-install
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── package.json
├── tsd.json
└── src
Expand Down
125 changes: 125 additions & 0 deletions docs/example-content-ngadal.md
@@ -0,0 +1,125 @@
# Example - Office Content Add-in in Angular ADAL

This document demonstrates creating a Content Add-in first in an empty project as well as in an existing project using [Angular](https://www.angularjs.org) ADAL as the technology.

## Empty Project

This example creates an Office Content Add-in as Angular ADAL within an empty project folder.

```bash
$ yo office --skip-install
```

### Prompt Responses

- **Project name (the display name):** My Office Add-in
- **Root folder of the project:** {blank}
- **Office project type:** Content Add-in
- **Technology to use:** Angular ADAL
- **Application ID as registered in Azure AD:** 03ad2348-c459-4573-8f7d-0ca44d822e7c
- **Supported Office Applications:** Word, Excel, PowerPoint, Project

```
.
├── .bowerrc
├── bower.json
├── gulpfile.js
├── index.html
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── tsd.json
├── app
│   ├── app.adalconfig.js
│   ├── app.config.js
│   ├── app.module.js
│   ├── app.routes.js
│   ├── home
│   │   ├── home.controller.js
│   │   └── home.html
│   └── services
│   └── data.service.js
├── content
│   └── Office.css
├── images
│   └── close.png
└── scripts
└── MicrosoftAjax.js
```

## Existing Project

The generator [nodehttps](https://www.npmjs.com/package/generator-nodehttps) is first used to create a folder for a self-hosted HTTPS site on the local development system.

```bash
$ yo nodehttps
```

### Prompt Responses:

- **What is the name of this project:** Project Name
- **What port will the site run on?**: 8443

### Results:

```
.
├── package.json
└── src
├── public
│   ├── content
│   │   └── site.css
│   └── index.html
└── server
└── server.js
```

Now run the Office Add-in generator:

```bash
$ yo office --skip-install
```
### Prompt Responses:

- **Project name (the display name):** My Office Add-in
- **Root folder of the project:** src/public
- **Office project type:** Content Add-in
- **Technology to use:** Angular ADAL
- **Application ID as registered in Azure AD:** 03ad2348-c459-4573-8f7d-0ca44d822e7c
- **Supported Office Applications:** Word, Excel, PowerPoint, Project

### Results:

```
.
├── .bowerrc
├── bower.json
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── package.json
├── tsd.json
└── src
├── public
│   ├── index.html
│   ├── app
│   │   ├── app.adalconfig.js
│   │   ├── app.config.js
│   │   ├── app.module.js
│   │   ├── app.routes.js
│   │   ├── home
│   │   │   ├── home.controller.js
│   │   │   └── home.html
│   │   └── services
│   │   └── data.service.js
│   ├── content
│   │   ├── Office.css
│   │   └── site.css
│   ├── images
│   │   └── close.png
│   └── scripts
│   └── MicrosoftAjax.js
└── server
└── server.js
```
16 changes: 2 additions & 14 deletions docs/example-mail-html.md
Expand Up @@ -25,14 +25,8 @@ $ yo office --skip-install
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── tsd.json
├── appcompose
│   ├── app.css
│   ├── app.js
│   └── home
│   ├── home.css
│   ├── home.html
│   └── home.js
├── appread
│   ├── app.css
│   ├── app.js
Expand Down Expand Up @@ -97,17 +91,11 @@ $ yo office --skip-install
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── package.json
├── tsd.json
└── src
├── public
│   ├── appcompose
│   │   ├── app.css
│   │   ├── app.js
│   │   └── home
│   │   ├── home.css
│   │   ├── home.html
│   │   └── home.js
│   ├── appread
│   │   ├── app.css
│   │   ├── app.js
Expand Down
20 changes: 2 additions & 18 deletions docs/example-mail-ng.md
Expand Up @@ -25,16 +25,8 @@ $ yo office --skip-install
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── tsd.json
├── appcompose
│   ├── app.module.js
│   ├── app.routes.js
│   ├── index.html
│   ├── home
│   │   ├── home.controller.js
│   │   └── home.html
│   └── services
│   └── data.service.js
├── appread
│   ├── app.module.js
│   ├── app.routes.js
Expand Down Expand Up @@ -101,20 +93,12 @@ $ yo office --skip-install
├── gulpfile.js
├── jsconfig.json
├── manifest.xml
├── manifest.xsd
├── package.json
├── tsd.json
└── src
├── public
│   ├── index.html
│   ├── appcompose
│   │   ├── app.module.js
│   │   ├── app.routes.js
│   │   ├── index.html
│   │   ├── home
│   │   │   ├── home.controller.js
│   │   │   └── home.html
│   │   └── services
│   │   └── data.service.js
│   ├── appread
│   │   ├── app.module.js
│   │   ├── app.routes.js
Expand Down

0 comments on commit 29c466e

Please sign in to comment.