npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

office-addin

v0.0.1

Published

Development tools for creating Office Add-ins on Windows and Mac

Downloads

235

Readme

office-addin

Development tools for creating Office Add-ins on Windows and Mac. office-addin aims to reduce a few particular pain points related to Office Add-in development:

  1. Setup manifest for sideloading during development
  2. Generating an Add-in manifest
  3. Validating an Add-in manifest
  4. Logging and error handling in Add-ins

Installation

Install office-addin as a development dependency for your project.

npm install --save-dev office-addin

The most straight-forward way to call the office-addin command-line tools is from package.json scripts. The following is an example scripts section of a project's package.json.

{
  "scripts": {
    "setup": "office-addin setup",
    "generate": "office-addin generate",
    "validate": "office-addin validate"
  }
}

Setup

Initial setup for an Office Add-in can be extensive, office-addin setup aims to make it a straightforward, simple process.

# Windows: Run as administrator
npm run setup

# Mac
sudo npm run setup

Setup performs the following steps:

  1. (Windows-only) Create .addin-catalog folder in User directory
  2. (Windows-only) Share .addin-catalog for access from Office
  3. Create symlink to Add-in manifest in catalog directory
  4. Generate development https certificates and register as trusted CA
  5. Instructions for loading add-in based on system type

Note: If manifest is generated after setup has been run initially, setup will need to be run again to create symlink of manifest.

Generate

office-addin generate is used to get you started with a valid Add-in manifest with required information completed. Additionally, it can be used to create matching manifests that handle differences between development and production.

Validate

office-addin validate checks the project's manifest against Microsoft's Add-in schema and verifies that the Add-in can be submitted to the Office Add-in Store.

Logging

office-addin can be used to output console.log and errors to the command line. There are two primary components to command line logging: server-side and client-side.

Server-side, attach the logging server to an existing node http server:

const server = ...
const addinServer = require('office-addin/server')();
addinServer.attachTo(server);

// Standalone (create server and attach to given port)
addinServer.attachTo(8080);

Alternative, run a standalone logging server

{
  "scripts": {
    "start": "office-addin server"
  }
}

Client-side, include office-addin (preferably before the project's js to catch compilation errors)

import 'office-addin';

For details on usage with Webpack, Gulp, create-react-app, and other environments, see the examples.