1.9.8 • Published 21 days ago

generator-office v1.9.8

Weekly downloads
589
License
MIT
Repository
github
Last release
21 days ago

topic: sample products:

  • Office 365 languages:
  • HTML extensions: contentType: tools technologies:
    • Add-ins createdDate: 8/21/2015 1:12:15 PM

Microsoft Office Add-in Project Generator - YO OFFICE!

npm version Downloads TravisCI Build Status

Yeoman generator for creating Microsoft Office Add-in projects using any text editor. Microsoft includes fantastic & rich development tools for creating Office related projects using Visual Studio 2013 or tools for Visual Studio 2015. This generator is for those developers who:

  • use an editor other than Visual Studio (we love Visual Studio Code)
  • are interested in using a technology other than plain HTML, CSS & JavaScript

If you are building an Angular or React add-in and would like to learn more about using Yo Office specifically for those frameworks, see Build an Add-in with React or Build an Add-in with Angular.

Like other Yeoman generators, this simply creates the scaffolding of files for your Office Add-in project. It allows you to create add-ins for:

  • Excel
  • OneNote
  • Outlook
  • PowerPoint
  • Project
  • Word
  • Excel Custom Functions (Preview: Requires the Insider channel for Excel)

Choose to create Office Add-in projects using plain HTML, CSS & JavaScript (mirroring the same projects that Visual Studio creates) or create Angular-based projects.

Install

Important: If this is the first time you're using Yeoman or installing a Yeoman generator, first install Git and Node.js (version 8.0.0 or later). For developers on Mac, we recommend using Node Version Manager to install Node.js with the right permissions. When the installation completes, restart your console (or if you are using Windows, restart your machine) to ensure you use the updated system environment variables.

Install yo (Yeoman) and generator-office globally using NPM.

$ npm install -g yo generator-office

Usage

$ yo office [arguments] [options]

Command Line Arguments

The following command line arguments are supported. If using the command line arguments, you must use them in the order cited below, or the generator will prompt you for the values.

projectType

Specifies the project type to create.

Project TypeDescription
taskpaneTask Pane add-in using HTML
angularTask Pane add-in using the Angular framework
reactTask Pane add-in using the React framework
excel-functionsTask Pane add-in with Excel Custom Functions
manifestManifest and related files for an Office Add-in
  • Type: String
  • Optional

name

Title of the project - this is the display name that is written the manifest.xml file.

  • Type: String
  • Optional

Note: The Windows command prompt requires this argument to be in quotes (e.g. "My Office Add-in")

host

The Microsoft Office client application that can host the add-in. The supported arguments include Excel (excel), OneNote (onenote), Outlook (outlook), PowerPoint (powerpoint), Project (project), and Word (word).

  • Type: String
  • Optional

Command Line Options

The following command line options are supported. If these are not specified, the generator will prompt you for the values before scaffolding the project. The options should be specified after the projectType, name and host arguments.

Specifying --output tells the generator to create the project in a specific location. If the output parameter is not specified, the project will be created in the current directory. If the output option specifies a non-empty folder, the generator will inform you so you don't accidentally overwrite existing files.

  • Type: String
  • Optional

Specifying --js tells the generator to use JavaScript.

  • Type: Boolean
  • Default: False
  • Optional

    Specifying --ts tells the generator to use TypeScript.

  • Type: Boolean

  • Default: False
  • Optional

    Specifying --details tells the generator to provide detailed help, including all the accepted values for each project type and host,

  • Type: Boolean

  • Default: False
  • Optional

--skip-install

After scaffolding the project, the generator (and all sub generators) run all package management install commands such as npm install & typings install. Specifying --skip-install tells the generator to skip this step.

  • Type: Boolean
  • Default: False
  • Optional

Running the Generated Site

Launch the local HTTPS site on https://localhost:3000 by simply typing the following command in your console:

$ npm start

Note: Office Add-ins should use HTTPS, not HTTP, even when you are developing. If you are prompted to install a certificate after you run npm start, accept the prompt to install the certificate that the Yeoman generator provides.

Browse to the 'External' IP address listed in your console to test your web app across multiple browsers and devices that are connected on your local network.

npm.io

Validate manifest.xml

As you modify your manifest.xml file, use the included Office Toolbox 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, use the following command in your project directory:

$ npm run validate

npm.io

For more information on manifest validation, refer to our add-in manifests documentation.

Contributing

Contributing Guidelines

If you are interested in contributing, please start by reading the Contributing Guidelines.

Development

Prerequisites

Ensure you have Node.js (version 8.0.0 or later) installed.

Install Yeoman.

$ npm install -g yo

Initialize the repo

$ git clone https://github.com/OfficeDev/generator-office.git
$ cd generator-office
$ npm install

Make your desired changes

Build and link your changes

$ npm run build
$ npm link
$ cd ..
$ yo office

At this point, yo office will be running with your custom built office-generator changes.


Copyright (c) 2017 Microsoft Corporation. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

1.9.10

21 days ago

1.9.9

23 days ago

1.9.8

3 months ago

1.9.7

10 months ago

1.9.6

11 months ago

1.9.5

1 year ago

1.9.4

1 year ago

1.9.3

2 years ago

1.9.2

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.8

2 years ago

1.8.2

2 years ago

1.8.7

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.8.1

2 years ago

1.8.0

3 years ago

1.7.10

3 years ago

1.7.9

3 years ago

1.7.8

3 years ago

1.7.7

3 years ago

1.7.6

4 years ago

1.7.5

4 years ago

1.7.4

4 years ago

1.7.3

4 years ago

1.7.2

4 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.27

5 years ago

1.1.26

5 years ago

1.1.25

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.1.0-beta.2

7 years ago

1.1.0-beta.1

7 years ago

1.1.1-beta.3

7 years ago

1.1.1-beta.2

7 years ago

1.1.1-beta.1

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

1.0.0-beta.10

7 years ago

1.0.0-beta.9

7 years ago

1.0.0-beta.8

7 years ago

1.0.0-beta.7

7 years ago

1.0.0-beta.6

7 years ago

1.0.0-beta.5

7 years ago

1.0.0-beta.4

7 years ago

1.0.0-beta.3

7 years ago

1.0.0-beta.2

7 years ago

1.0.0-beta.1

7 years ago

0.6.9-beta.16

7 years ago

0.6.9-beta.15

7 years ago

0.6.9-beta.14

7 years ago

0.6.9-beta.13

7 years ago

0.6.9-beta.12

7 years ago

0.6.9-beta.11

7 years ago

0.6.9-beta.10

7 years ago

0.6.9-beta.9

7 years ago

0.6.9-beta.8

7 years ago

0.6.9-beta.7

7 years ago

0.6.9-beta.6

7 years ago

0.6.9-beta.5

7 years ago

0.6.9-beta.4

7 years ago

0.6.9-beta.3

7 years ago

0.6.9-beta.2

7 years ago

0.6.9-beta.1

7 years ago

0.6.8-beta.4

7 years ago

0.6.8-beta.3

7 years ago

0.6.8-beta.2

7 years ago

0.6.8-beta.1

7 years ago

0.6.8

7 years ago

0.6.7

7 years ago

0.6.6

8 years ago

0.6.5

8 years ago

0.6.4

8 years ago

0.6.3

8 years ago

0.6.2

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

9 years ago

0.2.0

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago