diff --git a/.github/workflows/getFigmaImages.yml b/.github/workflows/getFigmaImages.yml index 184066606..8aa47fdd2 100644 --- a/.github/workflows/getFigmaImages.yml +++ b/.github/workflows/getFigmaImages.yml @@ -19,6 +19,6 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund --include=dev --ignore-scripts - name: Get Figma Images - run: node scripts/getFigmaImages.js '**/*.mdx' + run: node scripts/getFigmaImages.js '**/*.mdx' > figmaImageNodeUrls.json - name: Log file content run: cat figmaImageNodeUrls.json \ No newline at end of file diff --git a/figmaImageNodeUrls.json b/figmaImageNodeUrls.json deleted file mode 100644 index b75bd2210..000000000 --- a/figmaImageNodeUrls.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "https://www.figma.com/design/GCvY3Qv8czRgZgvl1dG6lp/Primer-Web?node-id=26998-2424&t=eruKCwLaYv3FX2Vu-4" -] \ No newline at end of file diff --git a/scripts/getFigmaImages.js b/scripts/getFigmaImages.js index a36c6d32e..856e19242 100644 --- a/scripts/getFigmaImages.js +++ b/scripts/getFigmaImages.js @@ -34,8 +34,8 @@ const run = async () => { const pattern = /]*src="([^"]+)"[^>]*>/g // find matches in find const matches = await findMatches(pattern, files) - // write the matches to a file - await fs.writeFile('figmaImageNodeUrls.json', JSON.stringify(matches, null, 2)) + // output result + console.log(JSON.stringify(matches, null, 2)) }