Newton's Programmatic Measurements

    @mapbox/style-templates

    0.9.0 • Public • Published

    Style templates

    A list of template and designer styles to share for accuracy across projects.

    Build Status

    Usage

    import { getTemplates } from '@mapbox/style-templates';
    const templates = getTemplates('production');
     
    console.log(templates);

    Contributing

    Add any new entry to templates.json. Styles are grouped in template or designer arrays and each entry should be formatted in the following way:

    {
        /* Required fields */
     
        "title": "Title of the style",
        "description": "Description of the style. Keep it pithy",
        "id": {
            "production": "A valid style url (i.e mapbox://styles/mapbox/streets-v9)",
            "staging": "A valid style url from staging"
        },
        "center": {
          "lng": -122.4241,
          "lat": 37.78,
          "zoom": 9
        },
     
     
        /* Required fields for designer styles */
     
        "author": "Name of author",
        "color": "as valid hex (i.e #333)"
    }

    Verify how your style will look from the static API by running the test site:

    npm install && npm start
    

    Open http://localhost:9966/ and thumbnails for each entry should be generated from the staging environment. To verify styles render correctly in production, replace npm start with:

    npm run start-production
    

    Releasing

    $ npm version {major|minor|patch}
    $ git push --follow-tags
    $ mbx npm publish

    Keywords

    none

    Install

    npm i @mapbox/style-templates

    DownloadsWeekly Downloads

    63

    Version

    0.9.0

    License

    Copyright © Mapbox

    Unpacked Size

    19.7 kB

    Total Files

    11

    Last publish

    Collaborators

    • mapbox-admin
    • mapbox-machine-user
    • mapbox-npm
    • mapbox-npm-01
    • mapbox-npm-02
    • mapbox-npm-03
    • mapbox-npm-04
    • mapbox-npm-05
    • mapbox-npm-06
    • mapbox-npm-07
    • mapbox-npm-08
    • mapbox-npm-09
    • mapbox-npm-advanced-actions
    • mapbox-npm-ci