diff --git a/package.json b/package.json index 3a8cfc39..330db009 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-office", - "version": "1.1.3", + "version": "1.1.4", "description": "Yeoman generator for creating Microsoft Office projects using any text editor.", "repository": { "type": "git", diff --git a/readme.md b/readme.md index 779855b1..cb25a608 100755 --- a/readme.md +++ b/readme.md @@ -61,12 +61,13 @@ Browse to the 'External' IP address listed in your console to test your web app ## Validate manifest.xml -As you modify your `manifest.xml` file, use the [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. +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, install the validator and type the following command in your console: +To run Office Add-in Validator, use the following command in your project directory: ```bash -$ validate-office-addin your_manifest.xml +$ npm run validate your_manifest.xml ``` +![](src/docs/assets/validator.gif) For more information on manifest validation, refer to our [add-in manifests documentation](https://dev.office.com/docs/add-ins/overview/add-in-manifests). diff --git a/src/app/index.ts b/src/app/index.ts index 00e22803..814c99e6 100755 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -297,28 +297,19 @@ module.exports = yo.extend({ if (this.project.isResourcePageOpened) { opn(`resource.html`); } - if (!this.options['skip-install'] && this.project.framework !== 'manifest-only') { + if (this.options['skip-install']) { this.installDependencies({ - npm: true, + npm: false, bower: false, callback: this._postInstallHints.bind(this) }); } else { - if (this.project.framework !== 'manifest-only') { - this.installDependencies({ - npm: false, - bower: false, - callback: this._postInstallHints.bind(this) - }); - } - else { - this.installDependencies({ - npm: false, - bower: false, - callback: this._exitProcess.bind(this) - }); - } + this.installDependencies({ + npm: true, + bower: false, + callback: this._exitProcess.bind(this) + }); } } catch (err) { insight.trackException(new Error('Installation Error: ' + err)); @@ -334,7 +325,7 @@ module.exports = yo.extend({ 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(` Or visit our repo at: https://github.com/officeDev/generator-office \n`); this.log('----------------------------------------------------------------------------------------------------------\n'); this._exitProcess(); }, diff --git a/src/app/templates/js/angular/package.json b/src/app/templates/js/angular/package.json index e4daa9a5..0bb1950d 100644 --- a/src/app/templates/js/angular/package.json +++ b/src/app/templates/js/angular/package.json @@ -4,13 +4,15 @@ "author": "", "version": "0.1.0", "scripts": { - "start": "browser-sync start --config bsconfig.json" + "start": "browser-sync start --config bsconfig.json", + "validate": "./node_modules/.bin/validate-office-addin" }, "dependencies": { "office-ui-fabric-js": "^1.3.0", "jquery": "^3.1.1", "angular": "^1.6.1", - "core-js": "^2.4.1" + "core-js": "^2.4.1", + "office-addin-validator": "^1.0.1" }, "devDependencies": { "browser-sync": "^2.18.5", diff --git a/src/app/templates/js/angular/resource.html b/src/app/templates/js/angular/resource.html index bac40983..c0948f38 100644 --- a/src/app/templates/js/angular/resource.html +++ b/src/app/templates/js/angular/resource.html @@ -107,8 +107,8 @@

Build

● Use the Office Helpers to simplify Authentication, Storage management etc. ● Use the included Office Add-in Validator 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. -# Type the following command in your console to validate your manifest: -$ validate-office-addin <%= projectInternalName %>-manifest.xml +# To validate your manifest, use the following command in your project directory: +$ npm run validate <%= projectInternalName %>-manifest.xml

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.

diff --git a/src/app/templates/js/jquery/package.json b/src/app/templates/js/jquery/package.json index 611bc093..037bf955 100644 --- a/src/app/templates/js/jquery/package.json +++ b/src/app/templates/js/jquery/package.json @@ -4,12 +4,14 @@ "author": "", "version": "0.1.0", "scripts": { - "start": "browser-sync start --config bsconfig.json" + "start": "browser-sync start --config bsconfig.json", + "validate": "./node_modules/.bin/validate-office-addin" }, "dependencies": { "core-js": "^2.4.1", "office-ui-fabric-js": "^1.3.0", - "jquery": "^3.1.1" + "jquery": "^3.1.1", + "office-addin-validator": "^1.0.1" }, "devDependencies": { "browser-sync": "^2.18.5", diff --git a/src/app/templates/js/jquery/resource.html b/src/app/templates/js/jquery/resource.html index bac40983..c0948f38 100644 --- a/src/app/templates/js/jquery/resource.html +++ b/src/app/templates/js/jquery/resource.html @@ -107,8 +107,8 @@

Build

● Use the Office Helpers to simplify Authentication, Storage management etc. ● Use the included Office Add-in Validator 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. -# Type the following command in your console to validate your manifest: -$ validate-office-addin <%= projectInternalName %>-manifest.xml +# To validate your manifest, use the following command in your project directory: +$ npm run validate <%= projectInternalName %>-manifest.xml

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.

diff --git a/src/app/templates/manifest-only/package.json b/src/app/templates/manifest-only/package.json index a751235b..dc86c8b7 100644 --- a/src/app/templates/manifest-only/package.json +++ b/src/app/templates/manifest-only/package.json @@ -3,6 +3,11 @@ "description": "", "author": "", "version": "0.1.0", - "dependencies": {}, + "scripts": { + "validate": "./node_modules/.bin/validate-office-addin" + }, + "dependencies": { + "office-addin-validator": "^1.0.1" + }, "devDependencies": {} } \ No newline at end of file diff --git a/src/app/templates/manifest-only/resource.html b/src/app/templates/manifest-only/resource.html index bac40983..c0948f38 100644 --- a/src/app/templates/manifest-only/resource.html +++ b/src/app/templates/manifest-only/resource.html @@ -107,8 +107,8 @@

Build

● Use the Office Helpers to simplify Authentication, Storage management etc. ● Use the included Office Add-in Validator 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. -# Type the following command in your console to validate your manifest: -$ validate-office-addin <%= projectInternalName %>-manifest.xml +# To validate your manifest, use the following command in your project directory: +$ npm run validate <%= projectInternalName %>-manifest.xml

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.

diff --git a/src/app/templates/ts/angular/package.json b/src/app/templates/ts/angular/package.json index 4b553f34..33435b11 100644 --- a/src/app/templates/ts/angular/package.json +++ b/src/app/templates/ts/angular/package.json @@ -7,13 +7,15 @@ "tsc": "tsc -p tsconfig.json -w", "server": "browser-sync start --config bsconfig.json", "copy": "cpx \"src/**/!(*.ts)\" dist --watch", - "start": "rimraf dist && concurrently \"npm run tsc\" \"npm run copy\" \"npm run server\"" + "start": "rimraf dist && concurrently \"npm run tsc\" \"npm run copy\" \"npm run server\"", + "validate": "./node_modules/.bin/validate-office-addin" }, "dependencies": { "core-js": "^2.4.1", "office-ui-fabric-js": "^1.3.0", "jquery": "^3.1.1", - "angular": "^1.6.1" + "angular": "^1.6.1", + "office-addin-validator": "^1.0.1" }, "devDependencies": { "concurrently": "^3.1.0", diff --git a/src/app/templates/ts/angular/resource.html b/src/app/templates/ts/angular/resource.html index bac40983..c0948f38 100644 --- a/src/app/templates/ts/angular/resource.html +++ b/src/app/templates/ts/angular/resource.html @@ -107,8 +107,8 @@

Build

● Use the Office Helpers to simplify Authentication, Storage management etc. ● Use the included Office Add-in Validator 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. -# Type the following command in your console to validate your manifest: -$ validate-office-addin <%= projectInternalName %>-manifest.xml +# To validate your manifest, use the following command in your project directory: +$ npm run validate <%= projectInternalName %>-manifest.xml

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.

diff --git a/src/app/templates/ts/jquery/package.json b/src/app/templates/ts/jquery/package.json index f6b8c6f4..8ef80d26 100644 --- a/src/app/templates/ts/jquery/package.json +++ b/src/app/templates/ts/jquery/package.json @@ -7,12 +7,14 @@ "tsc": "tsc -p tsconfig.json -w", "server": "browser-sync start --config bsconfig.json", "copy": "cpx \"src/**/!(*.ts)\" dist --watch", - "start": "rimraf dist && concurrently \"npm run tsc\" \"npm run copy\" \"npm run server\"" + "start": "rimraf dist && concurrently \"npm run tsc\" \"npm run copy\" \"npm run server\"", + "validate": "./node_modules/.bin/validate-office-addin" }, "dependencies": { "core-js": "^2.4.1", "office-ui-fabric-js": "^1.3.0", - "jquery": "^3.1.1" + "jquery": "^3.1.1", + "office-addin-validator": "^1.0.1" }, "devDependencies": { "concurrently": "^3.1.0", diff --git a/src/app/templates/ts/jquery/resource.html b/src/app/templates/ts/jquery/resource.html index bac40983..c0948f38 100644 --- a/src/app/templates/ts/jquery/resource.html +++ b/src/app/templates/ts/jquery/resource.html @@ -107,8 +107,8 @@

Build

● Use the Office Helpers to simplify Authentication, Storage management etc. ● Use the included Office Add-in Validator 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. -# Type the following command in your console to validate your manifest: -$ validate-office-addin <%= projectInternalName %>-manifest.xml +# To validate your manifest, use the following command in your project directory: +$ npm run validate <%= projectInternalName %>-manifest.xml

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.

diff --git a/src/app/templates/ts/react/package.json b/src/app/templates/ts/react/package.json index 679e5e8a..9637f3c3 100644 --- a/src/app/templates/ts/react/package.json +++ b/src/app/templates/ts/react/package.json @@ -7,14 +7,16 @@ "clean": "rimraf dist && rimraf .awcache", "lint": "tslint --project tsconfig.json", "start": "webpack-dev-server --inline --hot --config config/webpack.dev.js --progress", - "build": "npm run clean && webpack --config config/webpack.prod.js --colors --progress --bail" + "build": "npm run clean && webpack --config config/webpack.prod.js --colors --progress --bail", + "validate": "./node_modules/.bin/validate-office-addin" }, "dependencies": { - "core-js": "2.4.1", - "office-ui-fabric-react": "2.6.0", - "react": "15.4.2", - "react-dom": "15.4.2", - "typescript": "2.2.1" + "core-js": "^2.4.1", + "office-ui-fabric-react": "^2.6.0", + "react": "^15.4.2", + "react-dom": "^15.4.2", + "typescript": "^2.2.1", + "office-addin-validator": "^1.0.1" }, "devDependencies": { "@types/office-js": "0.0.39", diff --git a/src/app/templates/ts/react/resource.html b/src/app/templates/ts/react/resource.html index bac40983..c0948f38 100644 --- a/src/app/templates/ts/react/resource.html +++ b/src/app/templates/ts/react/resource.html @@ -107,8 +107,8 @@

Build

● Use the Office Helpers to simplify Authentication, Storage management etc. ● Use the included Office Add-in Validator 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. -# Type the following command in your console to validate your manifest: -$ validate-office-addin <%= projectInternalName %>-manifest.xml +# To validate your manifest, use the following command in your project directory: +$ npm run validate <%= projectInternalName %>-manifest.xml

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.

diff --git a/src/docs/assets/validator.gif b/src/docs/assets/validator.gif new file mode 100644 index 00000000..4437445c Binary files /dev/null and b/src/docs/assets/validator.gif differ