1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-13 18:14:21 +02:00

build(npm): automatically run build-icons for correct os (#2360)

This commit is contained in:
ReenigneArcher
2025-04-21 10:11:20 -04:00
committed by GitHub
parent 59215377cf
commit 4a82187a41
3 changed files with 27 additions and 9 deletions

View File

@@ -269,10 +269,10 @@ https://www.python.org/downloads/
> **Note**
> Make sure your Python install includes [pip](https://pypi.org/project/pip/)
<h3>Install Selenium</h3>
<h3>Install Dependencies</h3>
```bash
python3 -m pip install --upgrade pip && pip install selenium==4.1.0 requests==2.25.1
python -m pip install -r ./.github/scripts/requirements.txt
```
<h3 id="building-icons">Build the new icons</h3>
@@ -281,11 +281,7 @@ python3 -m pip install --upgrade pip && pip install selenium==4.1.0 requests==2.
Usually, this is done on each release, but you can have a sneak peek before a release.</p>
```bash
# Linux/Unix
npm run build-icons
# Windows
python3 ./.github/scripts/icomoon_build_githubless.py ./.github/scripts/build_assets/geckodriver-v0.32.2-win64/geckodriver.exe ./icomoon.json ./devicon.json ./icons ./ --headless
```
<i>The process might take a while, depending on your operating system's speed and the amount of icons.</i>
@@ -311,7 +307,7 @@ npm run dev # Will run on port 8000
<p>Or this command, which does exactly the same, but the port can be customized.</p>
```bash
python3 -m http.server <port>
python -m http.server <port>
```
<p>You're done now! :tada: Your build of Devicons should be available at <code>https://localhost:8000</code> (or the desired port).</p>

18
package-lock.json generated
View File

@@ -15,6 +15,7 @@
"gulp-sass": "^5.0.0",
"gulp-svgmin": "^3.0.0",
"open": "^10.0.3",
"run-script-os": "^1.1.6",
"sass": "^1.26.10",
"yargs": "^17.0.0"
}
@@ -4190,6 +4191,17 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/run-script-os": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/run-script-os/-/run-script-os-1.1.6.tgz",
"integrity": "sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==",
"dev": true,
"license": "MIT",
"bin": {
"run-os": "index.js",
"run-script-os": "index.js"
}
},
"node_modules/rxjs": {
"version": "7.8.1",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
@@ -8700,6 +8712,12 @@
"integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==",
"dev": true
},
"run-script-os": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/run-script-os/-/run-script-os-1.1.6.tgz",
"integrity": "sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==",
"dev": true
},
"rxjs": {
"version": "7.8.1",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",

View File

@@ -8,9 +8,12 @@
"peek-test": "python ./.github/scripts/icomoon_peek.py ./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json ./devicon.json ./icons ./ --pr_title \"$PR_TITLE\"",
"optimize-svg": "gulp optimizeSvg",
"bump": "gulp bumpVersion",
"build-icons": "python3 ./.github/scripts/icomoon_build_githubless.py ./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json ./devicon.json ./icons ./ --headless",
"build-icons": "run-script-os",
"build-icons:linux:macOS": "python ./.github/scripts/icomoon_build_githubless.py ./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json ./devicon.json ./icons ./ --headless",
"build-icons:windows": "python ./.github/scripts/icomoon_build_githubless.py ./.github/scripts/build_assets/geckodriver-v0.32.2-win64/geckodriver.exe ./icomoon.json ./devicon.json ./icons ./ --headless",
"build-icons:default": "echo 'Unsupported OS' && exit 1",
"dev": "concurrently \"npm:open-browser\" \"npm:start-local-server\"",
"start-local-server": "python3 -m http.server 8000",
"start-local-server": "python -m http.server 8000",
"open-browser": "node -e \"import('open').then(pkg => pkg.default('http://localhost:8000/docs'))\""
},
"repository": {
@@ -36,6 +39,7 @@
"gulp-sass": "^5.0.0",
"gulp-svgmin": "^3.0.0",
"open": "^10.0.3",
"run-script-os": "^1.1.6",
"sass": "^1.26.10",
"yargs": "^17.0.0"
}