generator-office
generator-office copied to clipboard
More modern alternative
Prerequisites
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- [x] I am running the latest version of Node and the tools
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed
Expected behavior
I expected to be able to standard Angular tooling and have the "normal" Angular/TypeScript developer experience.
Current behavior
Unfortunately, the generator has a very specific structure, diverging a lot from what you find with classic Angular apps (no angular.json, no support for stylesheets, specific Webpack build, different way to start, different way to debug, etc).
Steps to Reproduce
- Run
yo office
- Discover the frustration points
Context
I'm helping someone create a plugin for Word and while helping out, I've discovered that plugins could be created using Angular, which seemed nice enough to improve code quality, but then the issues with this generator surfaced.
Proposal
Improve this generator by turning it into a generator for more "standard" Angular applications, with an angular.json descriptor, support for https and (optionally) and easy enough way to side-load plugins.
In addition, it would be awesome to provide Angular (but also other Web developers) with a better debugging experience.
Ad minima, it would be nice to have a more recent version of Angular/TypeScript & al.
I've published an alternative based on Nrwl NX + a standard Angular 10+ app including the setup for an Office word plugin.
The repository can be found here: https://github.com/dsebastien/office-plugins-nx-workspace-template I've also published a small article about it here: https://dsebastien.medium.com/developing-office-plugins-using-angular-and-nx-5aaf4461e967
Don't take it badly through, I understand that this is all HARD stuff, but I'm sure we can do better in 2020! 👍
@dsebastien and @millerds, I fully support this request. I have used both the generator-office (through yo office
) and the office-plugins-nx-workspace-template. While the generator-office makes certain things very easy, it does not follow Angular best practices and still uses Angular 5 (released in 2017) in December 2021. The office-plugins-nx-workspace-template is much better in that respect, brings the goodness of Nrwl NX, but is not quite as easy to set up (noting that the generator-office is super-easy). It would be really nice to combine the best of both worlds.
I have significant experience in Office add-in development, using VBA and VSTO. I've also done web development, using Angular and React, for example. I then wanted to make the move to the office-js add-in model but also did not want to be stuck with very old versions of Angular (e.g., because I'm using recent versions in other projects). But that suddenly becomes very complex. In my case, I then did not make the move.
To make more developers adopt the office-js add-in model, it would make a lot of sense for Microsoft to provide a generator that produces modern applications (e.g., Angular 12 or even 13 right now) based on the relative best practices for such applications (that's the enhancement) while also making it as easy as possible (as before).