2
0
mirror of https://github.com/iconify/collections-json.git synced 2024-11-22 12:35:12 +00:00

Merge pull request #9 from DannyFeliz/patch-1

Fix syntax highlighting
This commit is contained in:
Vjacheslav Trushkin 2020-07-18 09:14:07 +03:00 committed by GitHub
commit 353a1dc53b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ Instructions below are for Node.js and PHP projects.
Run this command to add icons to your project: Run this command to add icons to your project:
``` ```bash
npm install --save @iconify/json npm install --save @iconify/json
``` ```
@ -26,7 +26,7 @@ Icons will be available in node_modules/@iconify/json
To resolve filename for any json file, use this: To resolve filename for any json file, use this:
``` ```js
const icons = require('@iconify/json'); const icons = require('@iconify/json');
// returns location of fa.json // returns location of fa.json
@ -40,7 +40,7 @@ Install and initialize Composer project. See documentation at [https://getcompos
Then open composer.json and add following code: Then open composer.json and add following code:
``` ```json
"require": { "require": {
"php": ">=5.6", "php": ">=5.6",
"iconify/json": "*" "iconify/json": "*"
@ -49,7 +49,7 @@ Then open composer.json and add following code:
then run: then run:
``` ```bash
composer install composer install
``` ```
@ -59,7 +59,7 @@ If you don't use Composer, clone GitHub repository and add necessary autoload co
To resolve filename for any json file, use this: To resolve filename for any json file, use this:
``` ```php
// returns location of fa.json // returns location of fa.json
$fa = \Iconify\IconsJSON\Finder::locate('fa'); $fa = \Iconify\IconsJSON\Finder::locate('fa');
``` ```
@ -76,7 +76,7 @@ If you need individual SVG images, you can generate them using Iconify JSON Tool
Format of json file is very simple: Format of json file is very simple:
``` ```js
{ {
"icons": { "icons": {
"icon-name": { "icon-name": {
@ -118,7 +118,7 @@ For more information see developer documentation on [https://iconify.design/docs
See JSON tools readme for instructions for [PHP](https://github.com/iconify/json-tools.php) or [Node.js](https://github.com/iconify/json-tools.js). See JSON tools readme for instructions for [PHP](https://github.com/iconify/json-tools.php) or [Node.js](https://github.com/iconify/json-tools.js).
``` ```js
const fs = require('fs'); const fs = require('fs');
const {SVG, Collection} = require('@iconify/json-tools'); const {SVG, Collection} = require('@iconify/json-tools');
@ -132,7 +132,7 @@ collection.listIcons(true).forEach(icon => {
}); });
``` ```
``` ```php
use \Iconify\JSONTools\Collection; use \Iconify\JSONTools\Collection;
use \Iconify\JSONTools\SVG; use \Iconify\JSONTools\SVG;