mirror of
https://github.com/penpot/penpot-export.git
synced 2025-03-12 07:21:20 -05:00
feat(demos): share the Penpot file ID
This commit is contained in:
parent
f988d73655
commit
9d76f9b0e4
4 changed files with 19 additions and 3 deletions
|
@ -2,6 +2,10 @@
|
||||||
# With scheme, optional port and path but without trailing slash
|
# With scheme, optional port and path but without trailing slash
|
||||||
#PENPOT_BASE_URL="https://your.penpot.instance"
|
#PENPOT_BASE_URL="https://your.penpot.instance"
|
||||||
|
|
||||||
|
# CONFIG Identifier of the Penpot file to be used
|
||||||
|
# It must be a UUID
|
||||||
|
PENPOT_FILE_ID="<retrieve it from the URL>"
|
||||||
|
|
||||||
# SECRET Personal access token to access the internal Penpot API
|
# SECRET Personal access token to access the internal Penpot API
|
||||||
# Generate a new one from the Penpot webapp at Your account -> Access Tokens
|
# Generate a new one from the Penpot webapp at Your account -> Access Tokens
|
||||||
# It only needs read-only permissions
|
# It only needs read-only permissions
|
||||||
|
|
|
@ -5,6 +5,10 @@ if (typeof process.env.PENPOT_ACCESS_TOKEN !== 'string') {
|
||||||
throw new Error('Missing PENPOT_ACCESS_TOKEN environment variable')
|
throw new Error('Missing PENPOT_ACCESS_TOKEN environment variable')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof process.env.PENPOT_FILE_ID !== 'string') {
|
||||||
|
throw new Error('Missing PENPOT_FILE_ID environment variable')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('@penpot-export/core').UserConfig}
|
* @type {import('@penpot-export/core').UserConfig}
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +17,7 @@ const config = {
|
||||||
accessToken: process.env.PENPOT_ACCESS_TOKEN,
|
accessToken: process.env.PENPOT_ACCESS_TOKEN,
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
fileId: '4a499800-872e-80e1-8002-fc0b585dc061',
|
fileId: process.env.PENPOT_FILE_ID,
|
||||||
colors: [
|
colors: [
|
||||||
{
|
{
|
||||||
format: 'css',
|
format: 'css',
|
||||||
|
|
|
@ -5,6 +5,10 @@ if (typeof process.env.PENPOT_ACCESS_TOKEN !== 'string') {
|
||||||
throw new Error('Missing PENPOT_ACCESS_TOKEN environment variable')
|
throw new Error('Missing PENPOT_ACCESS_TOKEN environment variable')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof process.env.PENPOT_FILE_ID !== 'string') {
|
||||||
|
throw new Error('Missing PENPOT_FILE_ID environment variable')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('@penpot-export/core').UserConfig}
|
* @type {import('@penpot-export/core').UserConfig}
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +17,7 @@ const config = {
|
||||||
accessToken: process.env.PENPOT_ACCESS_TOKEN,
|
accessToken: process.env.PENPOT_ACCESS_TOKEN,
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
fileId: '4a499800-872e-80e1-8002-fc0b585dc061',
|
fileId: process.env.PENPOT_FILE_ID,
|
||||||
colors: [
|
colors: [
|
||||||
{
|
{
|
||||||
format: 'json',
|
format: 'json',
|
||||||
|
|
|
@ -5,6 +5,10 @@ if (typeof process.env.PENPOT_ACCESS_TOKEN !== 'string') {
|
||||||
throw new Error('Missing PENPOT_ACCESS_TOKEN environment variable')
|
throw new Error('Missing PENPOT_ACCESS_TOKEN environment variable')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof process.env.PENPOT_FILE_ID !== 'string') {
|
||||||
|
throw new Error('Missing PENPOT_FILE_ID environment variable')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('@penpot-export/core').UserConfig}
|
* @type {import('@penpot-export/core').UserConfig}
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +17,7 @@ const config = {
|
||||||
accessToken: process.env.PENPOT_ACCESS_TOKEN,
|
accessToken: process.env.PENPOT_ACCESS_TOKEN,
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
fileId: '4a499800-872e-80e1-8002-fc0b585dc061',
|
fileId: process.env.PENPOT_FILE_ID,
|
||||||
colors: [
|
colors: [
|
||||||
{
|
{
|
||||||
format: 'scss',
|
format: 'scss',
|
||||||
|
|
Loading…
Add table
Reference in a new issue