@backpackjs/preflight
v1.2.3
Published
Backpack preflight is the second command (2) executed during the [backpack storefront initialization lifecycle](https://github.com/packdigital/backpackjs-monorepo/packages/cli#storefront-init-lifecycle).
Downloads
111
Maintainers
Keywords
Readme
🛫 Backpackjs Preflight
Backpack preflight is the second command (2) executed during the backpack storefront initialization lifecycle.
Backpackjs preflight is primarily responsible for:
- Validating backpack storefronts required environment variables
- (Optional) Logging the available environment variables during the storefront initialization.
Backpack preflight options.
Environment Variables
Environment variables enable users to easily configure different features and settings in backpack storefronts. Env vars are categorized in the following domains:
- SEO configuration
- Backpack setup
- CMS setup
- Build and Site settings
- Others
Backpack Environment Variables
TYPE | DOMAIN | REQUIRED | DESCRIPTION | EXAMPLE --- | --- | --- | --- | --- | BACKPACK_SITE_ID | backpack | ✅ | Backpack site id | 53ed44b3-e2d9-4a78-842a-70fd8e632393 BACKPACK_API_URL | backpack | ✅ | Backpack api url | https://app.packdigital.com BACKPACK_API_SECRET_TOKEN | backpack | ✅ | Backpack API token | 77c10d8cf683ebd2f0930391c2fb7fc3
CMS Environment Variables
TYPE | DOMAIN | REQUIRED | DESCRIPTION | EXAMPLE --- | --- | --- | --- | --- | CMS_CONTENT_TOKEN | cms | ✅ | Backpack CMS content API token | b78cb5d897a297dcdc7ccd0d605f83 CMS_MANAGEMENT_TOKEN | cms | ✅ | Backpack CMS management API token | 901920a33712485252f14c22c814f9 CMS_PUBLISHED_WEBHOOK_URL | cms | ✅ | Backpack storefront content publishing hook | https://api.netlify.com/build_hooks/60905f7bbed02300bf28503d CMS_ENV | cms | ✅ | Active Backpack CMS environment content branch (set dynamically) | main or staging..
Shopify Environment Variables
TYPE | DOMAIN | REQUIRED | DESCRIPTION | EXAMPLE --- | --- | --- | --- | --- | SHOPIFY_DOMAIN | shopify | ✅ | Shopify store admin url | my-store.myshopify.com SHOPIFY_CART_DOMAIN (to validate) | shopify | 🚧 | Shopify cart domain | shop.mystore.com SHOPIFY_ADMIN_API_PRODUCTION_PASSWORD | shopify | ✅ | Shopify Admin API production password (live site) | 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 SHOPIFY_ADMIN_API_STAGING_PASSWORD | shopify | ✅ | Shopify Admin API feature branches password (feature content branches) | shppa_2d146380b44a952e56978ebf7duc122d4 SHOPIFY_ADMIN_API_DEV_PASSWORD | shopify | ✅ | Shopify Admin API developer password (Each developer's password) | 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 SHOPIFY_ADMIN_API_VERSION | shopify | ✅ | Shopify Admin API version | 2021-04 SITE_URL (to validate) | shopify | 🚧 | Your headless site url | https://mystore.com SHOPIFY_STOREFRONT_API_TOKEN | shopify | ✅ | Shopify storefront API token | b082530638595004cf0af89c52d764d2 SHOPIFY_STOREFRONT_API_VERSION | shopify | ✅ | Shopify storefront API version | 2020-10
SEO Environment Variables
TYPE | DOMAIN | REQUIRED | DESCRIPTION | EXAMPLE --- | --- | --- | --- | --- | FACEBOOK_APP_ID | seo | 🚫 | Facebook app id | 123456 FACEBOOK_DOMAIN_VERIFICATION_ID | seo | 🚫 | Facebook domain verification id | abcde GOOGLE_SITE_VERIFICATION_ID | seo | 🚫 | Google site verification | abcde GTM_CONTAINER_ID | seo | 🚫 | Google GTM container id | GTM-WA2T8B2
Build Environment Variables
TYPE | DOMAIN | REQUIRED | DESCRIPTION | EXAMPLE --- | --- | --- | --- | --- | NODE_VERSION (to validate) | build | 🚧 | Build's nodejs version | 14.16.0 NPM_TOKEN (to validate) | build | 🚧 | @backpackjs npm token | abf80524-0f55-22be-9edf-eb71e9004d5d SILENCE_RECOIL_DUPE_WARNING (to validate) | build | 🚧 | Silence recoil SSR warnings | true ANALYZE (to validate) | build | 🚧 | Generate JS bundle reports | true
Preflight options
Backpack preflight can be configured via backpack.init.js
preflight options.