Skip to content

Figure out how Spoons and third party JS functionality should be installed/distributed #140

Description

@cmsj

Introduction

This issue exists to discuss/explore our options for two things:

  1. Distribution and Installation of Spoons
  2. Installation of third party libraries

These two things are being considered at the same time because they are closely related.


Spoons

A non-goal here is to maintain an "official" repository of Spoons. It proved to be a painful chokepoint in Hammerspoon 1, that we should not repeat.

Distribution

Options:

  1. Manual downloading of .spoon bundles
  2. npm

Manual downloading is obviously a very easy thing to provide, and it can be augmented with supporting mechanisms within Hammerspoon. npm provides all of that mechanism already, at the cost of requiring external tooling.

Installation

If we choose manual downloading of .spoon bundles, they can be opened with Hammerspoon and automatically unpacked into ~/.config/hammerspoon2/Spoons/. They can then be loaded with Hammerspoon 2's current, naive require().

If we choose npm then the user will need to use npm and some kind of tooling to prepare the Spoon files in ~/.config/hammerspoon2/ somewhere. They can then be loaded as modules with the mechanism from either #6 or #145.

Third party libraries

If this is something we want, there is really no better option than npm and a bundler.

It is not entirely clear how common it will be for users to want to install third party JS libraries from npm - many of them will depend on either Node or Browser runtime functionality that Hammerspoon 2 doesn't offer, however, it does seem somewhat likely that amongst the vast number of npm modules, there are some relevant/useful options.

On the assumption that installing modules from npm is desirable, a good number of Hammerspoon 2 users will be installing npm and some kind of bundler, and will want either #6 or #145 to be merged. That being the case, there seems to be a stronger argument for distributing/installing Spoons via npm too.

Discussion

It would be very helpful to hear from a number of voices on this subject.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedenhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions