diff --git a/README.md b/README.md index 7876edc3..b47164ad 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/adal-config.md b/docs/adal-config.md index d22368f0..07aea3f4 100644 --- a/docs/adal-config.md +++ b/docs/adal-config.md @@ -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']); } ``` @@ -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']); } ``` diff --git a/docs/example-content-html.md b/docs/example-content-html.md index dc73bfe3..1ad93a5d 100644 --- a/docs/example-content-html.md +++ b/docs/example-content-html.md @@ -37,6 +37,7 @@ $ yo office --skip-install ├── images │   └── close.png ├── manifest.xml +├── manifest.xsd └── scripts └── MicrosoftAjax.js ``` @@ -90,6 +91,7 @@ $ yo office --skip-install ├── gulpfile.js ├── jsconfig.json ├── manifest.xml +├── manifest.xsd ├── package.json ├── tsd.json └── src diff --git a/docs/example-content-ng.md b/docs/example-content-ng.md index c6ef188d..ea88b75d 100644 --- a/docs/example-content-ng.md +++ b/docs/example-content-ng.md @@ -26,6 +26,7 @@ $ yo office --skip-install ├── index.html ├── jsconfig.json ├── manifest.xml +├── manifest.xsd ├── tsd.json ├── app │   ├── app.module.js @@ -92,6 +93,7 @@ $ yo office --skip-install ├── gulpfile.js ├── jsconfig.json ├── manifest.xml +├── manifest.xsd ├── package.json ├── tsd.json └── src diff --git a/docs/example-content-ngadal.md b/docs/example-content-ngadal.md new file mode 100644 index 00000000..24048037 --- /dev/null +++ b/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 +``` \ No newline at end of file diff --git a/docs/example-mail-html.md b/docs/example-mail-html.md index 9f142bdc..2aa6988f 100644 --- a/docs/example-mail-html.md +++ b/docs/example-mail-html.md @@ -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 @@ -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 diff --git a/docs/example-mail-ng.md b/docs/example-mail-ng.md index 47b0797c..d73f0922 100644 --- a/docs/example-mail-ng.md +++ b/docs/example-mail-ng.md @@ -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 @@ -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 diff --git a/docs/example-mail-ngadal.md b/docs/example-mail-ngadal.md new file mode 100644 index 00000000..552bed75 --- /dev/null +++ b/docs/example-mail-ngadal.md @@ -0,0 +1,125 @@ +# Example - Office Mail Add-in in Angular ADAL + +This document demonstrates creating a Mail 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 Mail 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:** Mail Add-in (read & compose forms) +- **Technology to use:** Angular ADAL +- **Application ID as registered in Azure AD:** 03ad2348-c459-4573-8f7d-0ca44d822e7c +- **Supported Outlook forms:** E-Mail message - read form, Appointment - read form + +``` +. +├── .bowerrc +├── bower.json +├── gulpfile.js +├── jsconfig.json +├── manifest.xml +├── manifest.xsd +├── tsd.json +├── appread +│   ├── app.adalconfig.js +│   ├── app.config.js +│   ├── app.module.js +│   ├── app.routes.js +│   ├── index.html +│   ├── 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:** Mail Add-in (read & compose forms) +- **Technology to use:** Angular ADAL +- **Application ID as registered in Azure AD:** 03ad2348-c459-4573-8f7d-0ca44d822e7c +- **Supported Outlook forms:** E-Mail message - read form, Appointment - read form + +### Results: + +``` +. +├── .bowerrc +├── bower.json +├── gulpfile.js +├── jsconfig.json +├── manifest.xml +├── package.json +├── tsd.json +└── src + ├── public + │   ├── index.html + │   ├── appread + │   │   ├── app.adalconfig.js + │   │   ├── app.config.js + │   │   ├── app.module.js + │   │   ├── app.routes.js + │   │   ├── index.html + │   │   ├── home + │   │   │   ├── home.controller.js + │   │   │   └── home.html + │   │   └── services + │   │   └── data.service.js + │   ├── content + │   │   ├── Office.css + │   │   └── site.css + │   ├── images + │   │   └── close.png + │   └── scripts + │   └── MicrosoftAjax.js + └── server + └── server.js +``` \ No newline at end of file diff --git a/docs/example-taskpane-html.md b/docs/example-taskpane-html.md index 8d380f92..67833e88 100644 --- a/docs/example-taskpane-html.md +++ b/docs/example-taskpane-html.md @@ -37,6 +37,7 @@ $ yo office --skip-install ├── images │   └── close.png ├── manifest.xml +├── manifest.xsd └── scripts └── MicrosoftAjax.js ``` @@ -90,6 +91,7 @@ $ yo office --skip-install ├── gulpfile.js ├── jsconfig.json ├── manifest.xml +├── manifest.xsd ├── package.json ├── tsd.json └── src diff --git a/docs/example-taskpane-ng.md b/docs/example-taskpane-ng.md index fbdbca7f..54d0d60e 100644 --- a/docs/example-taskpane-ng.md +++ b/docs/example-taskpane-ng.md @@ -26,6 +26,7 @@ $ yo office --skip-install ├── index.html ├── jsconfig.json ├── manifest.xml +├── manifest.xsd ├── tsd.json ├── app │   ├── app.module.js @@ -92,6 +93,7 @@ $ yo office --skip-install ├── gulpfile.js ├── jsconfig.json ├── manifest.xml +├── manifest.xsd ├── package.json ├── tsd.json └── src diff --git a/docs/example-taskpane-ngadal.md b/docs/example-taskpane-ngadal.md new file mode 100644 index 00000000..f1bc39a1 --- /dev/null +++ b/docs/example-taskpane-ngadal.md @@ -0,0 +1,125 @@ +# Example - Office Task Pane Add-in in Angular ADAL + +This document demonstrates creating a Task Pane 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 Task Pane 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:** Task Pane 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:** Task Pane 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 +``` \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md index 372aa0b2..b296e83b 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -11,12 +11,15 @@ - **Office Content Add-in** - [Office Content Add-in in HTML](example-content-html.md) - Demonstrates creating a Content Add-in first in an empty project as well as in an existing project using HTML, CSS & JavaScript as the technology. - [Office Content Add-in in Angular](example-content-ng.md) - Demonstrates creating a Content Add-in first in an empty project as well as in an existing project using Angular as the technology. + - [Office Content Add-in in Angular ADAL](example-content-ngadal.md) - Demonstrates creating a Content Add-in first in an empty project as well as in an existing project using Angular ADAL as the technology. - **Office Mail Add-in** - [Office Mail Add-in in HTML](example-mail-html.md) - Demonstrates creating a Mail Add-in first in an empty project as well as in an existing project using HTML, CSS & JavaScript as the technology. - [Office Mail Add-in in Angular](example-mail-ng.md) - Demonstrates creating a Mail Add-in first in an empty project as well as in an existing project using Angular as the technology. + - [Office Mail Add-in in Angular ADAL](example-mail-ngadal.md) - Demonstrates creating a Mail Add-in first in an empty project as well as in an existing project using Angular ADAL as the technology. - **Office Task Pane Add-in** - [Office Task Pane Add-in in HTML](example-taskpane-html.md) - Demonstrates creating a Task Pane Add-in first in an empty project as well as in an existing project using HTML, CSS & JavaScript as the technology. - [Office Task Pane Add-in in Angular](example-taskpane-ng.md) - Demonstrates creating a Task Pane Add-in first in an empty project as well as in an existing project using Angular as the technology. + - [Office Task Pane Add-in in Angular ADAL](example-taskpane-ngadal.md) - Demonstrates creating a Task Pane Add-in first in an empty project as well as in an existing project using Angular ADAL as the technology. # Additional Documentation diff --git a/generators/content/index.js b/generators/content/index.js index f5939139..809a1ad6 100644 --- a/generators/content/index.js +++ b/generators/content/index.js @@ -340,12 +340,14 @@ module.exports = generators.Base.extend({ if (!bowerJson.dependencies['microsoft.office.js']) { bowerJson.dependencies['microsoft.office.js'] = '*'; } - /* istanbul ignore else */ - if (!bowerJson.dependencies['jquery']) { - bowerJson.dependencies['jquery'] = '~1.9.1'; - } switch (addinTech) { + case 'html': + /* istanbul ignore else */ + if (!bowerJson.dependencies['jquery']) { + bowerJson.dependencies['jquery'] = '~1.9.1'; + } + break; // if angular... case 'ng': /* istanbul ignore else */ diff --git a/generators/content/templates/common/_package.json b/generators/content/templates/common/_package.json index 24144938..276b3e04 100644 --- a/generators/content/templates/common/_package.json +++ b/generators/content/templates/common/_package.json @@ -7,6 +7,8 @@ "devDependencies": { "chalk": "^1.1.1", "gulp": "^3.9.0", + "gulp-load-plugins": "^1.0.0", + "gulp-task-listing": "^1.0.1", "gulp-webserver": "^0.9.1", "minimist": "^1.2.0", "xmllint": "git+https://github.com/kripken/xml.js.git" diff --git a/generators/content/templates/common/gulpfile.js b/generators/content/templates/common/gulpfile.js index f9f402c5..4d7066ba 100644 --- a/generators/content/templates/common/gulpfile.js +++ b/generators/content/templates/common/gulpfile.js @@ -6,6 +6,14 @@ var fs = require('fs'); var minimist = require('minimist'); var xmllint = require('xmllint'); var chalk = require('chalk'); +var $ = require('gulp-load-plugins')({lazy: true}); + +gulp.task('help', $.taskListing.withFilters(function(task) { + var mainTasks = ['default', 'help', 'serve-static', 'validate-xml']; + var isSubTask = mainTasks.indexOf(task) < 0; + return isSubTask; +})); +gulp.task('default', ['help']); gulp.task('serve-static', function(){ gulp.src('.') @@ -53,8 +61,10 @@ gulp.task('validate-xml', function () { function validateHighResolutionIconUrl(xml, result) { if (xml && result) { - if (xml.indexOf(' -1 && - xml.indexOf('>> 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']); } })(); diff --git a/generators/content/templates/ng-adal/index.html b/generators/content/templates/ng-adal/index.html index 3bd34fb9..a4877c17 100644 --- a/generators/content/templates/ng-adal/index.html +++ b/generators/content/templates/ng-adal/index.html @@ -6,7 +6,6 @@ - @@ -16,8 +15,7 @@ - - + @@ -33,9 +31,11 @@ - + -
+
+
+
diff --git a/generators/content/templates/ng/_bower.json b/generators/content/templates/ng/_bower.json index c56d5803..bd89e5d3 100644 --- a/generators/content/templates/ng/_bower.json +++ b/generators/content/templates/ng/_bower.json @@ -3,7 +3,6 @@ "version": "0.1.0", "dependencies": { "microsoft.office.js": "*", - "jquery": "~1.9.1", "angular": "~1.4.4", "angular-route": "~1.4.4", "angular-sanitize": "~1.4.4", diff --git a/generators/content/templates/ng/_tsd.json b/generators/content/templates/ng/_tsd.json index 5f2c8262..6fa06ef1 100644 --- a/generators/content/templates/ng/_tsd.json +++ b/generators/content/templates/ng/_tsd.json @@ -5,9 +5,6 @@ "path": "typings", "bundle": "typings/tsd.d.ts", "installed": { - "jquery/jquery.d.ts": { - "commit": "04a025ada3492a22df24ca2d8521c911697721b3" - }, "angularjs/angular.d.ts": { "commit": "04a025ada3492a22df24ca2d8521c911697721b3" }, diff --git a/generators/content/templates/ng/app.module.js b/generators/content/templates/ng/app.module.js index 7ac8be41..a45b610e 100644 --- a/generators/content/templates/ng/app.module.js +++ b/generators/content/templates/ng/app.module.js @@ -18,7 +18,7 @@ // when Office has initalized, manually bootstrap the app Office.initialize = function(){ console.log('>>> Office.initialize()'); - angular.bootstrap(jQuery('#container'), ['officeAddin']); + angular.bootstrap(document.getElementById('container'), ['officeAddin']); }; })(); diff --git a/generators/content/templates/ng/index.html b/generators/content/templates/ng/index.html index a1a688fd..c475091f 100644 --- a/generators/content/templates/ng/index.html +++ b/generators/content/templates/ng/index.html @@ -6,7 +6,6 @@ - @@ -14,8 +13,7 @@ - - + @@ -29,9 +27,11 @@ - + -
+
+
+
diff --git a/generators/mail/index.js b/generators/mail/index.js index 54b4cb39..50d4ba1a 100644 --- a/generators/mail/index.js +++ b/generators/mail/index.js @@ -338,12 +338,14 @@ module.exports = generators.Base.extend({ if (!bowerJson.dependencies['microsoft.office.js']) { bowerJson.dependencies['microsoft.office.js'] = '*'; } - /* istanbul ignore else */ - if (!bowerJson.dependencies['jquery']) { - bowerJson.dependencies['jquery'] = '~1.9.1'; - } switch (addinTech) { + case 'html': + /* istanbul ignore else */ + if (!bowerJson.dependencies['jquery']) { + bowerJson.dependencies['jquery'] = '~1.9.1'; + } + break; // if angular... case 'ng': /* istanbul ignore else */ diff --git a/generators/mail/templates/common/_package.json b/generators/mail/templates/common/_package.json index 5ec51e8a..67c40246 100644 --- a/generators/mail/templates/common/_package.json +++ b/generators/mail/templates/common/_package.json @@ -7,6 +7,8 @@ "devDependencies": { "chalk": "^1.1.1", "gulp": "^3.9.0", + "gulp-load-plugins": "^1.0.0", + "gulp-task-listing": "^1.0.1", "gulp-webserver": "^0.9.1", "minimist": "^1.2.0", "xmllint": "git+https://github.com/kripken/xml.js.git" diff --git a/generators/mail/templates/common/gulpfile.js b/generators/mail/templates/common/gulpfile.js index 671f6368..03bf088c 100644 --- a/generators/mail/templates/common/gulpfile.js +++ b/generators/mail/templates/common/gulpfile.js @@ -6,6 +6,14 @@ var fs = require('fs'); var minimist = require('minimist'); var xmllint = require('xmllint'); var chalk = require('chalk'); +var $ = require('gulp-load-plugins')({lazy: true}); + +gulp.task('help', $.taskListing.withFilters(function(task) { + var mainTasks = ['default', 'help', 'serve-static', 'validate-xml']; + var isSubTask = mainTasks.indexOf(task) < 0; + return isSubTask; +})); +gulp.task('default', ['help']); gulp.task('serve-static', function(){ gulp.src('.') @@ -53,8 +61,10 @@ gulp.task('validate-xml', function () { function validateHighResolutionIconUrl(xml, result) { if (xml && result) { - if (xml.indexOf(' -1 && - xml.indexOf('>> 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']); } })(); diff --git a/generators/mail/templates/ng-adal/appcompose/index.html b/generators/mail/templates/ng-adal/appcompose/index.html index 56d8c6a8..de18d5fb 100644 --- a/generators/mail/templates/ng-adal/appcompose/index.html +++ b/generators/mail/templates/ng-adal/appcompose/index.html @@ -7,7 +7,6 @@ - @@ -17,8 +16,7 @@ - - + @@ -33,9 +31,11 @@ - + -
+
+
+
diff --git a/generators/mail/templates/ng-adal/appread/app.module.js b/generators/mail/templates/ng-adal/appread/app.module.js index 7dda02d5..2b5592e2 100644 --- a/generators/mail/templates/ng-adal/appread/app.module.js +++ b/generators/mail/templates/ng-adal/appread/app.module.js @@ -21,13 +21,11 @@ // when Office has initalized, manually bootstrap the app 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']); } })(); diff --git a/generators/mail/templates/ng-adal/appread/index.html b/generators/mail/templates/ng-adal/appread/index.html index a61ce00b..b50a41b0 100644 --- a/generators/mail/templates/ng-adal/appread/index.html +++ b/generators/mail/templates/ng-adal/appread/index.html @@ -7,7 +7,6 @@ - @@ -17,8 +16,7 @@ - - + @@ -33,9 +31,11 @@ - + -
+
+
+
diff --git a/generators/mail/templates/ng/_bower.json b/generators/mail/templates/ng/_bower.json index c56d5803..bd89e5d3 100644 --- a/generators/mail/templates/ng/_bower.json +++ b/generators/mail/templates/ng/_bower.json @@ -3,7 +3,6 @@ "version": "0.1.0", "dependencies": { "microsoft.office.js": "*", - "jquery": "~1.9.1", "angular": "~1.4.4", "angular-route": "~1.4.4", "angular-sanitize": "~1.4.4", diff --git a/generators/mail/templates/ng/_tsd.json b/generators/mail/templates/ng/_tsd.json index 5f2c8262..6fa06ef1 100644 --- a/generators/mail/templates/ng/_tsd.json +++ b/generators/mail/templates/ng/_tsd.json @@ -5,9 +5,6 @@ "path": "typings", "bundle": "typings/tsd.d.ts", "installed": { - "jquery/jquery.d.ts": { - "commit": "04a025ada3492a22df24ca2d8521c911697721b3" - }, "angularjs/angular.d.ts": { "commit": "04a025ada3492a22df24ca2d8521c911697721b3" }, diff --git a/generators/mail/templates/ng/appcompose/app.module.js b/generators/mail/templates/ng/appcompose/app.module.js index 7ac8be41..a45b610e 100644 --- a/generators/mail/templates/ng/appcompose/app.module.js +++ b/generators/mail/templates/ng/appcompose/app.module.js @@ -18,7 +18,7 @@ // when Office has initalized, manually bootstrap the app Office.initialize = function(){ console.log('>>> Office.initialize()'); - angular.bootstrap(jQuery('#container'), ['officeAddin']); + angular.bootstrap(document.getElementById('container'), ['officeAddin']); }; })(); diff --git a/generators/mail/templates/ng/appcompose/index.html b/generators/mail/templates/ng/appcompose/index.html index 7aa87c8f..8b3adbfe 100644 --- a/generators/mail/templates/ng/appcompose/index.html +++ b/generators/mail/templates/ng/appcompose/index.html @@ -7,7 +7,6 @@ - @@ -15,8 +14,7 @@ - - + @@ -29,9 +27,11 @@ - + -
+
+
+
diff --git a/generators/mail/templates/ng/appread/app.module.js b/generators/mail/templates/ng/appread/app.module.js index 7ac8be41..a45b610e 100644 --- a/generators/mail/templates/ng/appread/app.module.js +++ b/generators/mail/templates/ng/appread/app.module.js @@ -18,7 +18,7 @@ // when Office has initalized, manually bootstrap the app Office.initialize = function(){ console.log('>>> Office.initialize()'); - angular.bootstrap(jQuery('#container'), ['officeAddin']); + angular.bootstrap(document.getElementById('container'), ['officeAddin']); }; })(); diff --git a/generators/mail/templates/ng/appread/index.html b/generators/mail/templates/ng/appread/index.html index 6f3e3ec4..7d2b4ba5 100644 --- a/generators/mail/templates/ng/appread/index.html +++ b/generators/mail/templates/ng/appread/index.html @@ -7,7 +7,6 @@ - @@ -15,8 +14,7 @@ - - + @@ -29,9 +27,11 @@ - + -
+
+
+
diff --git a/generators/taskpane/index.js b/generators/taskpane/index.js index 0927c4eb..3c4ece7d 100644 --- a/generators/taskpane/index.js +++ b/generators/taskpane/index.js @@ -338,12 +338,14 @@ module.exports = generators.Base.extend({ if (!bowerJson.dependencies['microsoft.office.js']) { bowerJson.dependencies['microsoft.office.js'] = '*'; } - /* istanbul ignore else */ - if (!bowerJson.dependencies['jquery']) { - bowerJson.dependencies['jquery'] = '~1.9.1'; - } switch (addinTech) { + case 'html': + /* istanbul ignore else */ + if (!bowerJson.dependencies['jquery']) { + bowerJson.dependencies['jquery'] = '~1.9.1'; + } + break; // if angular... case 'ng': /* istanbul ignore else */ diff --git a/generators/taskpane/templates/common/_package.json b/generators/taskpane/templates/common/_package.json index 5ec51e8a..67c40246 100644 --- a/generators/taskpane/templates/common/_package.json +++ b/generators/taskpane/templates/common/_package.json @@ -7,6 +7,8 @@ "devDependencies": { "chalk": "^1.1.1", "gulp": "^3.9.0", + "gulp-load-plugins": "^1.0.0", + "gulp-task-listing": "^1.0.1", "gulp-webserver": "^0.9.1", "minimist": "^1.2.0", "xmllint": "git+https://github.com/kripken/xml.js.git" diff --git a/generators/taskpane/templates/common/gulpfile.js b/generators/taskpane/templates/common/gulpfile.js index f714cf61..04cb5e8d 100644 --- a/generators/taskpane/templates/common/gulpfile.js +++ b/generators/taskpane/templates/common/gulpfile.js @@ -6,6 +6,14 @@ var fs = require('fs'); var minimist = require('minimist'); var xmllint = require('xmllint'); var chalk = require('chalk'); +var $ = require('gulp-load-plugins')({lazy: true}); + +gulp.task('help', $.taskListing.withFilters(function(task) { + var mainTasks = ['default', 'help', 'serve-static', 'validate-xml']; + var isSubTask = mainTasks.indexOf(task) < 0; + return isSubTask; +})); +gulp.task('default', ['help']); gulp.task('serve-static', function(){ gulp.src('.') @@ -53,8 +61,10 @@ gulp.task('validate-xml', function () { function validateHighResolutionIconUrl(xml, result) { if (xml && result) { - if (xml.indexOf(' -1 && - xml.indexOf('>> 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']); } })(); diff --git a/generators/taskpane/templates/ng-adal/index.html b/generators/taskpane/templates/ng-adal/index.html index 6c2f5c47..2f7fa33a 100644 --- a/generators/taskpane/templates/ng-adal/index.html +++ b/generators/taskpane/templates/ng-adal/index.html @@ -6,7 +6,6 @@ - @@ -16,8 +15,7 @@ - - + @@ -32,9 +30,11 @@ - + -
+
+
+
diff --git a/generators/taskpane/templates/ng/_bower.json b/generators/taskpane/templates/ng/_bower.json index c56d5803..bd89e5d3 100644 --- a/generators/taskpane/templates/ng/_bower.json +++ b/generators/taskpane/templates/ng/_bower.json @@ -3,7 +3,6 @@ "version": "0.1.0", "dependencies": { "microsoft.office.js": "*", - "jquery": "~1.9.1", "angular": "~1.4.4", "angular-route": "~1.4.4", "angular-sanitize": "~1.4.4", diff --git a/generators/taskpane/templates/ng/_tsd.json b/generators/taskpane/templates/ng/_tsd.json index 5f2c8262..6fa06ef1 100644 --- a/generators/taskpane/templates/ng/_tsd.json +++ b/generators/taskpane/templates/ng/_tsd.json @@ -5,9 +5,6 @@ "path": "typings", "bundle": "typings/tsd.d.ts", "installed": { - "jquery/jquery.d.ts": { - "commit": "04a025ada3492a22df24ca2d8521c911697721b3" - }, "angularjs/angular.d.ts": { "commit": "04a025ada3492a22df24ca2d8521c911697721b3" }, diff --git a/generators/taskpane/templates/ng/app.module.js b/generators/taskpane/templates/ng/app.module.js index 7ac8be41..a45b610e 100644 --- a/generators/taskpane/templates/ng/app.module.js +++ b/generators/taskpane/templates/ng/app.module.js @@ -18,7 +18,7 @@ // when Office has initalized, manually bootstrap the app Office.initialize = function(){ console.log('>>> Office.initialize()'); - angular.bootstrap(jQuery('#container'), ['officeAddin']); + angular.bootstrap(document.getElementById('container'), ['officeAddin']); }; })(); diff --git a/generators/taskpane/templates/ng/index.html b/generators/taskpane/templates/ng/index.html index 99ea7d24..ff3adafc 100644 --- a/generators/taskpane/templates/ng/index.html +++ b/generators/taskpane/templates/ng/index.html @@ -6,7 +6,6 @@ - @@ -14,8 +13,7 @@ - - + @@ -28,9 +26,11 @@ - + -
+
+
+
diff --git a/package.json b/package.json index 1e1e95e5..b4d275bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-office", - "version": "0.4.0", + "version": "0.4.1", "description": "Yeoman generator for creating Microsoft Office projects using any text editor.", "license": "MIT", "author": "OfficeDev", @@ -54,7 +54,7 @@ "deep-extend": "^0.4.0", "lodash": "^3.10.1", "uuid": "^2.0.1", - "yeoman-generator": "^0.20.3", + "yeoman-generator": "^0.21.1", "yosay": "^1.0.2", "xml2js": "^0.4.10" }, @@ -71,7 +71,7 @@ "gulp-print": "^2.0.1", "gulp-task-listing": "^1.0.1", "gulp-util": "^3.0.6", - "istanbul": "^0.3.18", + "istanbul": "^0.4.0", "jscs": "^2.1.1", "jscs-jsdoc": "^1.1.0", "jshint-stylish": "^2.0.1", diff --git a/test/content/existingproj-html.js b/test/content/existingproj-html.js index 72a138c1..e95ce54d 100644 --- a/test/content/existingproj-html.js +++ b/test/content/existingproj-html.js @@ -51,6 +51,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -165,6 +167,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -300,6 +304,18 @@ describe('office:content', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/content/existingproj-ng.js b/test/content/existingproj-ng.js index adaec103..0911b01b 100644 --- a/test/content/existingproj-ng.js +++ b/test/content/existingproj-ng.js @@ -51,6 +51,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -169,6 +171,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -291,7 +295,6 @@ describe('office:content', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -304,6 +307,18 @@ describe('office:content', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/content/existingproj-ngadal.js b/test/content/existingproj-ngadal.js index 9cb07b87..4b4cc962 100644 --- a/test/content/existingproj-ngadal.js +++ b/test/content/existingproj-ngadal.js @@ -51,6 +51,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -174,6 +176,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -331,7 +335,6 @@ describe('office:content', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -344,6 +347,18 @@ describe('office:content', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/content/newproj-html.js b/test/content/newproj-html.js index 4ebdadc8..30cac5e2 100644 --- a/test/content/newproj-html.js +++ b/test/content/newproj-html.js @@ -52,6 +52,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -156,6 +158,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -291,6 +295,18 @@ describe('office:content', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/content/newproj-ng.js b/test/content/newproj-ng.js index 60c05b4d..229ca391 100644 --- a/test/content/newproj-ng.js +++ b/test/content/newproj-ng.js @@ -51,6 +51,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -133,7 +135,6 @@ describe('office:content', function(){ version: '0.1.0', dependencies: { 'microsoft.office.js': '*', - jquery: '~1.9.1', angular: '~1.4.4', 'angular-route': '~1.4.4', 'angular-sanitize': '~1.4.4', @@ -159,6 +160,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -281,7 +284,6 @@ describe('office:content', function(){ it ('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -294,6 +296,18 @@ describe('office:content', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/content/newproj-ngadal.js b/test/content/newproj-ngadal.js index 58e91996..8bb93916 100644 --- a/test/content/newproj-ngadal.js +++ b/test/content/newproj-ngadal.js @@ -51,6 +51,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -137,7 +139,6 @@ describe('office:content', function(){ version: '0.1.0', dependencies: { 'microsoft.office.js': '*', - jquery: '~1.9.1', angular: '~1.4.4', 'angular-route': '~1.4.4', 'angular-sanitize': '~1.4.4', @@ -164,6 +165,8 @@ describe('office:content', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -321,7 +324,6 @@ describe('office:content', function(){ it ('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -334,6 +336,18 @@ describe('office:content', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/mail/existingproj-html.js b/test/mail/existingproj-html.js index ed4ff789..d3370aaf 100644 --- a/test/mail/existingproj-html.js +++ b/test/mail/existingproj-html.js @@ -52,6 +52,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -169,6 +171,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -349,6 +353,18 @@ describe('office:mail', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ assert.file('gulpfile.js'); diff --git a/test/mail/existingproj-ng.js b/test/mail/existingproj-ng.js index 0a7ba150..310eec06 100644 --- a/test/mail/existingproj-ng.js +++ b/test/mail/existingproj-ng.js @@ -52,6 +52,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -174,6 +176,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -341,7 +345,6 @@ describe('office:mail', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -354,6 +357,18 @@ describe('office:mail', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/mail/existingproj-ngadal.js b/test/mail/existingproj-ngadal.js index 36702479..a34e6826 100644 --- a/test/mail/existingproj-ngadal.js +++ b/test/mail/existingproj-ngadal.js @@ -52,6 +52,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -181,6 +183,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -388,7 +392,6 @@ describe('office:mail', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -401,6 +404,18 @@ describe('office:mail', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/mail/newproj-html.js b/test/mail/newproj-html.js index 0ed06d69..38ac0c3b 100644 --- a/test/mail/newproj-html.js +++ b/test/mail/newproj-html.js @@ -52,6 +52,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -163,6 +165,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -343,6 +347,18 @@ describe('office:mail', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/mail/newproj-ng.js b/test/mail/newproj-ng.js index 2e7b3322..084409e1 100644 --- a/test/mail/newproj-ng.js +++ b/test/mail/newproj-ng.js @@ -51,6 +51,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -141,7 +143,6 @@ describe('office:mail', function(){ version: '0.1.0', dependencies: { 'microsoft.office.js': '*', - jquery: '~1.9.1', angular: '~1.4.4', 'angular-route': '~1.4.4', 'angular-sanitize': '~1.4.4', @@ -167,6 +168,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -335,7 +338,6 @@ describe('office:mail', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -348,6 +350,18 @@ describe('office:mail', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/mail/newproj-ngadal.js b/test/mail/newproj-ngadal.js index 58cee39b..59e4aeee 100644 --- a/test/mail/newproj-ngadal.js +++ b/test/mail/newproj-ngadal.js @@ -51,6 +51,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -147,7 +149,6 @@ describe('office:mail', function(){ version: '0.1.0', dependencies: { 'microsoft.office.js': '*', - jquery: '~1.9.1', angular: '~1.4.4', 'angular-route': '~1.4.4', 'angular-sanitize': '~1.4.4', @@ -174,6 +175,8 @@ describe('office:mail', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -382,7 +385,6 @@ describe('office:mail', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -395,6 +397,18 @@ describe('office:mail', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/taskpane/existingproj-html.js b/test/taskpane/existingproj-html.js index f2ac6293..b969a4e4 100644 --- a/test/taskpane/existingproj-html.js +++ b/test/taskpane/existingproj-html.js @@ -128,6 +128,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -263,6 +265,18 @@ describe('office:taskpane', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/taskpane/existingproj-ng.js b/test/taskpane/existingproj-ng.js index 4955563f..06ad090f 100644 --- a/test/taskpane/existingproj-ng.js +++ b/test/taskpane/existingproj-ng.js @@ -132,6 +132,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -254,7 +256,6 @@ describe('office:taskpane', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -267,6 +268,18 @@ describe('office:taskpane', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/taskpane/existingproj-ngadal.js b/test/taskpane/existingproj-ngadal.js index 8ccabccc..69fac241 100644 --- a/test/taskpane/existingproj-ngadal.js +++ b/test/taskpane/existingproj-ngadal.js @@ -137,6 +137,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -294,7 +296,6 @@ describe('office:taskpane', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -307,6 +308,18 @@ describe('office:taskpane', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/taskpane/newproj-html.js b/test/taskpane/newproj-html.js index 924b2536..b864f289 100644 --- a/test/taskpane/newproj-html.js +++ b/test/taskpane/newproj-html.js @@ -53,6 +53,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -157,6 +159,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -292,6 +296,18 @@ describe('office:taskpane', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/taskpane/newproj-ng.js b/test/taskpane/newproj-ng.js index e5dff383..351dff55 100644 --- a/test/taskpane/newproj-ng.js +++ b/test/taskpane/newproj-ng.js @@ -52,6 +52,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -134,7 +136,6 @@ describe('office:taskpane', function(){ version: '0.1.0', dependencies: { 'microsoft.office.js': '*', - jquery: '~1.9.1', angular: '~1.4.4', 'angular-route': '~1.4.4', 'angular-sanitize': '~1.4.4', @@ -160,6 +161,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -282,7 +285,6 @@ describe('office:taskpane', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -295,6 +297,18 @@ describe('office:taskpane', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){ diff --git a/test/taskpane/newproj-ngadal.js b/test/taskpane/newproj-ngadal.js index 66a14ae3..e7abd3ba 100644 --- a/test/taskpane/newproj-ngadal.js +++ b/test/taskpane/newproj-ngadal.js @@ -52,6 +52,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -138,7 +140,6 @@ describe('office:taskpane', function(){ version: '0.1.0', dependencies: { 'microsoft.office.js': '*', - jquery: '~1.9.1', angular: '~1.4.4', 'angular-route': '~1.4.4', 'angular-sanitize': '~1.4.4', @@ -165,6 +166,8 @@ describe('office:taskpane', function(){ devDependencies: { chalk: '^1.1.1', gulp: '^3.9.0', + 'gulp-load-plugins': '^1.0.0', + 'gulp-task-listing': '^1.0.1', 'gulp-webserver': '^0.9.1', minimist: '^1.2.0', xmllint: 'git+https://github.com/kripken/xml.js.git' @@ -322,7 +325,6 @@ describe('office:taskpane', function(){ it('has correct *.d.ts references', function(done){ expect(tsd.installed).to.exist; - expect(tsd.installed['jquery/jquery.d.ts']).to.exist; expect(tsd.installed['angularjs/angular.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-route.d.ts']).to.exist; expect(tsd.installed['angularjs/angular-sanitize.d.ts']).to.exist; @@ -335,6 +337,18 @@ describe('office:taskpane', function(){ * gulpfile.js is good */ describe('gulpfule.js contents', function(){ + + it('contains task \'help\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'help\','); + done(); + }); + + it('contains task \'default\'', function(done){ + assert.file('gulpfile.js'); + assert.fileContent('gulpfile.js', 'gulp.task(\'default\','); + done(); + }); it('contains task \'serve-static\'', function(done){