diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c42022e4..8aea9bb1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,16 +7,23 @@ Simple Icons welcomes contributions and corrections. Before contributing, please 1. Fork this repository 1. (Optional) Clone the fork - ```bash - # Using SSH - git clone --filter=tree:0 git@github.com:simple-icons/simple-icons.git + - Using SSH - # Using HTTPS - git clone --filter=tree:0 https://github.com/simple-icons/simple-icons.git + ```shell + git clone --filter=tree:0 git@github.com:simple-icons/simple-icons.git + ``` - # Using GitHub CLI - gh repo clone simple-icons/simple-icons -- --filter=tree:0 - ``` + - Using HTTPS + + ```shell + git clone --filter=tree:0 https://github.com/simple-icons/simple-icons.git + ``` + + - Using GitHub CLI + + ```shell + gh repo clone simple-icons/simple-icons -- --filter=tree:0 + ``` 1. Create a new branch from the latest `develop` 1. Start hacking on the new branch @@ -366,14 +373,16 @@ If you have an affiliation to the brand you contributing that allows you to spea ## Using Docker -You can build a Docker image for this project from the Dockerfile by running: +You can build a Docker image for this project which can be used as a development environment and allows you to run SVGO safely. First, build the Docker image for simple-icons (if you haven't yet): -```bash -# Build the Docker image for simple-icons (if you haven't yet) -$ docker build . -t simple-icons +```shell +docker build . -t simple-icons +``` -# Start a Docker container for simple-icons and attach to it -$ docker run -it --rm --entrypoint "/bin/ash" simple-icons +Then, start a Docker container for simple-icons and attach to it: + +```shell +docker run -it --rm --entrypoint "/bin/ash" simple-icons ``` --- diff --git a/README.md b/README.md index ae8ad7f6..c4adc234 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ These examples use the latest major version. This means you won't receive any up The icons are also available through our npm package. To install, simply run: -``` -$ npm install simple-icons +```shell +npm install simple-icons ``` The API can then be used as follows, where `[ICON SLUG]` is replaced by a [slug]: @@ -53,7 +53,7 @@ The API can then be used as follows, where `[ICON SLUG]` is replaced by a [slug] const simpleIcons = require('simple-icons'); // Get a specific icon by its slug as: -simpleIcons.Get('[ICON SLUG]'); +// simpleIcons.Get('[ICON SLUG]'); // For example: const icon = simpleIcons.Get('simpleicons'); @@ -65,7 +65,7 @@ This is useful if you are e.g. compiling your code with [webpack](https://webpac ```javascript // Import a specific icon by its slug as: -require('simple-icons/icons/[ICON SLUG]'); +// require('simple-icons/icons/[ICON SLUG]'); // For example: const icon = require('simple-icons/icons/simpleicons'); @@ -74,7 +74,6 @@ const icon = require('simple-icons/icons/simpleicons'); Either method will return an icon object: ```javascript - console.log(icon); /* @@ -113,16 +112,16 @@ for (const title in simpleIcons) { There are also TypeScript type definitions for the Node package. To use them, simply run: -``` -$ npm install @types/simple-icons +```shell +npm install @types/simple-icons ``` ### PHP Usage The icons are also available through our Packagist package. To install, simply run: -``` -$ composer require simple-icons/simple-icons +```shell +composer require simple-icons/simple-icons ``` The package can then be used as follows, where `[ICON SLUG]` is replaced by a [slug]: