-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add --assets usage documentation (wip)
- Loading branch information
1 parent
1e769da
commit c118d83
Showing
2 changed files
with
159 additions
and
26 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
docs/developer-guide/cli-methods/bundle-the-basemaps-assets-archive.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Bundle the `basemaps` assets archive | ||
|
||
This guide explains how to generate the `basemaps` bundled assets archive using the **basemaps/cli** package. | ||
|
||
## Get started | ||
|
||
Clone the [**linz/basemaps-config**][bm_config_repo] repository to your machine. | ||
|
||
=== "HTTPS" | ||
|
||
```bash | ||
git clone https://github.com/linz/basemaps-config.git | ||
``` | ||
|
||
=== "SSH" | ||
|
||
```bash | ||
git clone git@github.com:linz/basemaps-config.git | ||
``` | ||
|
||
=== "GitHub CLI" | ||
|
||
```bash | ||
gh repo clone linz/basemaps-config | ||
``` | ||
|
||
!!! abstract "Paths" | ||
|
||
This guide uses variables as shorthand to reference key directories and files. On your machine, note the following paths: | ||
|
||
=== "`BM_CONFIG_REPO`" | ||
|
||
The path to the **basemaps-config** repository folder on your machine. | ||
|
||
```bash | ||
$BM_CONFIG_REPO = {path_to}/basemaps-config | ||
``` | ||
|
||
=== "`BM_CLI_BUILD`" | ||
|
||
The **basemaps/cli** package provides a **bundle-assets** function we can use to generate a bundled assets archive. | ||
|
||
The path to the **build** folder of the **basemaps/cli** package. | ||
|
||
```bash | ||
$BM_CLI_BUILD = $BM_REPO/packages/cli/build/cli | ||
``` | ||
|
||
=== "`BM_SPRITES_BIN`" | ||
|
||
The **basemaps/sprites** package provides a default function we can use to generate sprite sheets from a collection of sprite images. | ||
|
||
The path to the **bin** folder of the **basemaps/sprites** package. | ||
|
||
```bash | ||
$BM_SPRITES_BIN = $BM_REPO/packages/sprites/bin | ||
``` | ||
## Run the `basemaps/cli` package | ||
|
||
### Command | ||
|
||
Use the following command to bundle the `basemaps` assets archive: | ||
|
||
```bash | ||
node $BM_CLI_BUILD/bin.js bundle-assets \ | ||
--assets $BM_CONFIG_REPO/assets \ | ||
--output assets.bundle.tar.co \ | ||
``` | ||
|
||
### Parameters | ||
|
||
=== "`--assets`" | ||
|
||
Specifies the location of the assets folder to use. This folder refers to that of which is within the `basemaps-config` repository. | ||
|
||
=== "`--output`" | ||
|
||
Specifies where to save the bundled assets archive, relative to the location from which you execute the command. You can specify a location and filename of your choice. | ||
|
||
<!-- external links --> | ||
|
||
[bm_config_repo]: https://github.com/linz/basemaps-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters