Pack locations
Pack locations tell the publisher how to find the parts of your graphics pack from your local file system, usually after your project has been built.
packLocations.dotcom
- Type:
string | false;
- Default:
'dist/';
Path from project root to a directory where HTML files for dotcom pages are built. There must be a root index.html
in this directory.
Set to false
if the project has no dotcom pages.
packLocations.embeds
- Type:
string | false;
- Default:
'dist/embeds/{locale}/{slug}/';
Path pattern from project root to capture all directories where files for embeddable pages are built. There must be a root index.html
in each directory found.
Path should include capture groups for the edition’s locale
and slug
, which must be defined in the directory path.
For example, setting to dist/embeds/{locale}/{slug}/
:
import { defineConfig } from '@reuters-graphics/graphics-kit-publisher';
export default defineConfig({ packLocations: { embeds: 'dist/embeds/{locale}/{slug}/', },});
… would capture the following editions from your local file system:
Directorydist
Directoryembeds
Directoryen {locale}
Directorypage {slug}
- index.html
Directorymap {slug}
- index.html
Directoryde {locale}
Directorymap {slug}
- index.html
Set to false
if the project has no embeddable pages.
packLocations.statics
- Type:
string | false;
- Default:
'media-assets/{locale}/{slug}/';
Path from project root to all directories where static files for embeddable graphics are saved. There must be at least one static file in the root of each directory. Valid static files include .eps
, .jpg
, .png
or .pdf
.
Path should include capture groups for the edition’s locale
and slug
, which must be defined in the directory path.
For example, setting to media-files/{locale}/{slug}/
:
import { defineConfig } from '@reuters-graphics/graphics-kit-publisher';
export default defineConfig({ packLocations: { statics: 'media-files/{locale}/{slug}/', },});
… would capture the following editions from your local file system:
Directorymedia-files
Directoryen {locale}
Directorymap {slug}
- map.eps EPS edition
- map.jpg JPG edition
Directoryde {locale}
Directorymap {slug}
- map.jpg JPG edition
- map.pdf PDF edition
Set to false
if the project has no static files.