Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing settings builder as a local dep #23

Open
achou11 opened this issue Nov 18, 2021 · 2 comments
Open

Consider removing settings builder as a local dep #23

achou11 opened this issue Nov 18, 2021 · 2 comments

Comments

@achou11
Copy link
Member

achou11 commented Nov 18, 2021

Stemmed from a conversation with @rudokemper while doing some debugging work on mapeo-settings-builder. Based on programs usage, there's no consensus on how the build step is done i.e. via the local npm run script command (npm run build) or using a globally installed executable mapeo-settings .... Documentation seems to be somewhat conflicting as well.

Seems like defaulting to using a global install would require less technical overhead for end-users (less of a need to understand node/npm intricacies), but it comes at the cost of some customization regarding the version of the builder you use (e.g. maybe a more recent version of the executable isn't compatible with the project being worked on).

Wanted to bring this up for discussion and see if there are any additional thoughts on it

@gmaclennan

@rudokemper
Copy link
Member

(cross-posted from Dd #programs for transparency):

So what this means in practice is that you only have to install mapeo-settings-builder once, and then you can just run a command like mapeo-settings build in any config directory and it will just work ™.

This would differ from one of the current workflows, which involves installing mapeo-settings-builder locally within a config directory, and then running npm run build to execute a specific build script within the config's package.json file.

This latter workflow involves more steps (and requires internet access to download all of the dependencies if they haven't been set up already as we had to do recently), but does give more leverage for any specific build specs that were written into the config (such as language localization choice I believe). However I don't know how many configs are using this currently. For all the ones I've built, they've been clones of the default config with no changes made to the build script.

So that could be the norm and the global mapeo-settings-builder install could riff off of that, and if we do need a specific build script, then that one could benefit from using the local npm run script command.

@achou11
Copy link
Member Author

achou11 commented Nov 18, 2021

(also cross-posted from Dd #programs):

for programs side, i guess the question boils down to choosing between which workflow is easier to understand/use by default:

  1. install mapeo-settings-builder globally i.e. npm install -g mapeo-settings-builder (only need to do this once, unless you’re updating the version of it)
  2. create a project for custom config from the default template
  3. run mapeo-settings on project directory to build the config (potentially with any flags that may be needed)

or

  1. create a project for custom config from the default template
  2. (optionally) update the build field in package.json to provide any flags that may be needed
  3. run npm run build on project directory to build the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants