From 78d8307707095811569196c6d2ec234696df99d6 Mon Sep 17 00:00:00 2001 From: "Francesa Alfaro, Agustin" Date: Wed, 18 Jun 2025 14:02:34 -0600 Subject: [PATCH] feat: adding README.md to release package Signed-off-by: Francesa Alfaro, Agustin --- .github/workflows/release.yml | 2 +- .gitignore | 2 ++ README.md | 6 ++++++ package.json | 2 ++ scripts/build.js | 22 ++++++++++++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 scripts/build.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f307136..44aa9d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,5 +46,5 @@ jobs: GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} RELEASE_PROCESS: 'true' run: | - npm run release:zip + npm run release:prepare npx semantic-release diff --git a/.gitignore b/.gitignore index b247d70..ad87ac4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ dist.web.zip node_modules gen/src/GraphQL/** gen/src/GraphQL +dist.web/README.md +dist.web/LICENSE.md diff --git a/README.md b/README.md index 68e4e18..7da64e8 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,9 @@ Where - `spark-icon` class name is a mandatory parameter that tells a page to use styles from _iconfont_ component - `spark-icon-copy` instructs to use a particular shape for an icon. In this example the icon will look like two overlapping pages (copy to clipboard). - `spark-icon-light`, `spark-icon-regular`, `spark-icon-solid` filled or outlined shapes with a thin, medium or thick stroke + +## Troubleshooting + +### Installing packages while connected to the Intel VPN + +Running fastasticon on Windows: Downgrade version to 1.2.3. diff --git a/package.json b/package.json index 4be21e3..a356316 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,9 @@ "iconfont:build:solid": "npm run iconfont:svg-fixer-solid && npm run iconfont:font-style-solid && npm run iconfont:build", "iconfont:build:light": "npm run iconfont:svg-fixer-light && npm run iconfont:font-style-light && npm run iconfont:build", "iconfont:build:all": "npm run iconfont:build:solid && npm run iconfont:build:light && npm run iconfont:build:regular && npm run iconfont:cp-png-icons", + "release:build": "node scripts/build.js", "release:zip": "npm run zip:custom ./dist.web dist.web.zip", + "release:prepare": "npm run release:build && npm run release:zip", "zip:custom": "node scripts/create-zip.js" }, "lint-staged": { diff --git a/scripts/build.js b/scripts/build.js new file mode 100644 index 0000000..23530da --- /dev/null +++ b/scripts/build.js @@ -0,0 +1,22 @@ +const fs = require('fs-extra') +const path = require('path') +const glob = require('glob') + +// Create dist.web directory if it doesn't exist +fs.ensureDirSync('dist.web') + +// Copy LICENSE.md file if it exists +if (fs.existsSync('LICENSE.md')) { + console.log('Copying LICENSE.md file...') + fs.copySync('LICENSE.md', 'dist.web/LICENSE.md') + console.log('Copied: LICENSE.md -> dist.web/LICENSE.md') +} + +// Copy README.md file if it exists +if (fs.existsSync('README.md')) { + console.log('Copying README.md file...') + fs.copySync('README.md', 'dist.web/README.md') + console.log('Copied: README.md -> dist.web/README.md') +} + +console.log('Build completed successfully!')