5.0.0 • Published 17 days ago

mapeo-settings-builder v5.0.0

Weekly downloads
63
License
MIT
Repository
github
Last release
17 days ago

Mapeo Settings Builder

npm version js-standard-style

Build settings file for Mapeo Desktop

When run in a folder of configuration, icon files and imagery definitions will create a single settings tarball which can be imported into Mapeo Desktop to configure the application for a particular use-case.

Table of Contents

Install

npm install --global mapeo-settings-builder

Usage

# Lint settings
mapeo-settings lint

# Build settings tar file and output to stdout
mapeo-settings build {OPTIONS}

# Generate a project key
mapeo-settings generate-key

Mapeo Presets Builder expects the following file structure in the current directory:

├── categories
│   ├── a_category.json
│   ├── other_category.json
│   └── ...
├── fields
│   ├── a_field.json
│   ├── other_field.json
│   └── ...
├── presets
│   ├── preset_category
│   │   ├── a_preset.json
│   │   ├── other_preset.json
│   │   └── ...
│   ├── other_preset_category
│   │   ├── a_preset.json
│   │   ├── other_preset.json
│   │   └── ...
│   ├── uncategorized_preset.json
│   ├── other_uncategorized_preset.json
│   └── ...
├── icons
│   ├── a_icon.svg
│   ├── other_icon.svg
│   └── ...
├── defaults.json
├── imagery.json
├── metadata.json
└── style.css

Where:

  • imagery.json is an object that should follow the structure defined by editor-layer-index
  • style.css is custom css to override iD css.
  • icons is a folder of svg images to build a sprite for preset icons
  • categories, fields, presets, defaults.json see iD presets
  • metadata.json contains optional properties:
    • projectKey is a 32 byte (256-bit) random number encoded as a hex string (numbers 0-9 and lowercase letters a-f)
    • name is a human-readable name of these presets (written from package.json if it does not already exist)
    • version is the version number of the presets (written from package.json if it does not already exist)
    • syncServer is the URL of a mapeo-web server to sync to. (written from package.json if it does not already exist). For the Digital Democracy server this should be wss://cloud.mapeo.app, but the project key will need to be enabled on the server first.

Options

  • -l, --lang=<langCode> - the base language of the settings, defaults to en.
  • -o, --output=<filename> - write the settings tarball to this file, if unspecified prints to stdout.
  • -t, --timeout=<number> - timeout limit (in milliseconds) for icon generation process.

Contribute

PRs accepted.

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Digital Democracy

5.0.0

17 days ago

4.0.0

2 months ago

3.4.1

2 years ago

3.4.0

2 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.15.0

4 years ago

2.13.0

4 years ago

2.14.0

4 years ago

2.11.0

4 years ago

2.12.0

4 years ago

2.11.1

4 years ago

2.10.0

4 years ago

2.9.0

4 years ago

2.8.0

5 years ago

2.7.1

5 years ago

2.7.0

5 years ago

2.7.0-beta.1

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.4.1

6 years ago

2.4.0

7 years ago

2.3.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago