diff --git a/README.md b/README.md index 2a51a19f..8ffb181e 100644 --- a/README.md +++ b/README.md @@ -269,10 +269,10 @@ https://www.python.org/downloads/ > **Note** > Make sure your Python install includes [pip](https://pypi.org/project/pip/) -

Install Selenium

+

Install Dependencies

```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 ```

Build the new icons

@@ -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.

```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 ``` The process might take a while, depending on your operating system's speed and the amount of icons. @@ -311,7 +307,7 @@ npm run dev # Will run on port 8000

Or this command, which does exactly the same, but the port can be customized.

```bash -python3 -m http.server +python -m http.server ```

You're done now! :tada: Your build of Devicons should be available at https://localhost:8000 (or the desired port).

diff --git a/package-lock.json b/package-lock.json index 1e8698e2..174bdabe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index acbc7346..763cf63d 100644 --- a/package.json +++ b/package.json @@ -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" }