react-svg-icon
Advanced tools
Comparing version 2.0.0 to 3.0.0
105
package.json
{ | ||
"name": "react-svg-icon", | ||
"version": "2.0.0", | ||
"description": "SVG icon component for React", | ||
"main": "./lib/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/springload/react-svg-icon.git" | ||
}, | ||
"homepage": "https://github.com/springload/react-svg-icon", | ||
"version": "3.0.0", | ||
"description": "Accessible SVG icon component for React", | ||
"main": "./dist/index.js", | ||
"author": "Springload", | ||
"license": "MIT", | ||
"homepage": "https://springload.github.io/react-svg-icon/", | ||
"bugs": "https://github.com/springload/react-svg-icon/issues", | ||
"directories": { | ||
"example": "examples" | ||
}, | ||
"authors": [ | ||
"Thomas Winter", | ||
"Vincent Audebert", | ||
"Thibaud Colas" | ||
], | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"react": "^0.14.3 || ^15.0.0" | ||
}, | ||
"keywords": [ | ||
@@ -29,6 +15,83 @@ "reactjs", | ||
"component", | ||
"accessible", | ||
"a11y", | ||
"svg", | ||
"icon", | ||
"icons" | ||
] | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/springload/react-svg-icon.git" | ||
}, | ||
"eslintConfig": { | ||
"extends": "springload" | ||
}, | ||
"jest": { | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/", | ||
"/dist/", | ||
"/pages/", | ||
"/examples/test.js" | ||
], | ||
"snapshotSerializers": [ | ||
"enzyme-to-json/serializer" | ||
] | ||
}, | ||
"babel": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"browsers": [ | ||
"> 1%", | ||
"IE 11" | ||
] | ||
} | ||
} | ||
], | ||
"react" | ||
] | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.22.2", | ||
"babel-jest": "^19.0.0", | ||
"babel-loader": "^6.2.10", | ||
"babel-preset-env": "^1.4.0", | ||
"babel-preset-react": "^6.16.0", | ||
"coveralls": "^2.11.15", | ||
"enzyme": "^2.8.2", | ||
"enzyme-to-json": "^1.5.1", | ||
"eslint": "^3.19.0", | ||
"eslint-config-springload": "1.0.2", | ||
"eslint-plugin-import": "2.2.0", | ||
"eslint-plugin-jsx-a11y": "3.0.2", | ||
"eslint-plugin-react": "6.10.3", | ||
"jest": "^19.0.2", | ||
"prop-types": "^15.5.8", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4", | ||
"react-test-renderer": "^15.5.4", | ||
"webpack": "^2.4.1", | ||
"webpack-dev-server": "^2.4.5" | ||
}, | ||
"peerDependencies": { | ||
"prop-types": "^15.5.8", | ||
"react": "^0.14.9 || ^15.3.0", | ||
"react-dom": "^0.14.9 || ^15.3.0" | ||
}, | ||
"scripts": { | ||
"start": "webpack-dev-server --config=webpack/webpack.config.dev.js", | ||
"js": "babel -d dist lib", | ||
"dist": "npm run js -s", | ||
"linter:js": "eslint", | ||
"lint": "npm run linter:js -s -- .", | ||
"test": "jest", | ||
"test:watch": "jest --watch --coverage", | ||
"test:coverage": "jest --coverage", | ||
"test:ci": "npm run lint -s && npm run test:coverage -s && npm run dist -s && npm run pages -s", | ||
"coveralls": "cat ./coverage/lcov.info | coveralls", | ||
"pages": "rm -rf pages && cp -R examples pages && webpack --config=webpack/webpack.config.prod.js", | ||
"deploy": "./bin/deploy.sh" | ||
} | ||
} |
@@ -1,66 +0,74 @@ | ||
[react-svg-icon](https://springload.github.io/react-svg-icon/) [![npm](https://img.shields.io/npm/v/react-svg-icon.svg?style=flat-square)](https://www.npmjs.com/package/react-svg-icon) [![Build Status](https://travis-ci.org/springload/react-svg-icon.svg?branch=master)](https://travis-ci.org/springload/react-svg-icon) [![devDependency Status](https://david-dm.org/springload/react-svg-icon/dev-status.svg)](https://david-dm.org/springload/react-svg-icon#info=devDependencies) | ||
===================== | ||
# [react-svg-icon](https://springload.github.io/react-svg-icon/) [![npm](https://img.shields.io/npm/v/react-svg-icon.svg?style=flat-square)](https://www.npmjs.com/package/react-svg-icon) [![Build Status](https://travis-ci.org/springload/react-svg-icon.svg?branch=master)](https://travis-ci.org/springload/react-svg-icon) [![Coverage Status](https://coveralls.io/repos/github/springload/react-svg-icon/badge.svg)](https://coveralls.io/github/springload/react-svg-icon) | ||
> SVG icon component for React. [Demo](https://springload.github.io/react-svg-icon/) | ||
> Accessible SVG icon component for React. | ||
## Inline SVG assets | ||
Check out the [online demo](https://springload.github.io/react-svg-icon/)! | ||
Create your SVG sprite and inline them at the start of you HTML document. There's a nice tutorial on how to do this on [CSS-Tricks](https://css-tricks.com/svg-sprites-use-better-icon-fonts/). | ||
## Usage | ||
## Installation | ||
```sh | ||
npm install --save react-svg-icon | ||
``` | ||
`npm install --save react-svg-icon` | ||
## Usage | ||
```jsx | ||
import Icon from 'react-svg-icon'; | ||
<Icon name='icon-name' className='optional-class' /> | ||
<Icon name="rocket" /> | ||
<Icon name="rocket" className="i--red" /> | ||
// Optionally, use a title to add an accessible label | ||
<Icon name='icon-name' title="Icon label" /> | ||
<Icon name="rocket" title="Start the trip" /> | ||
``` | ||
## Contributing | ||
### Inline SVG assets | ||
### Install / useful commands | ||
Create your SVG sprite and inline them at the start of you HTML document. There's a nice tutorial on how to do this on [CSS-Tricks](https://css-tricks.com/svg-sprites-use-better-icon-fonts/). | ||
You need `npm install -g rackt-cli@0.5.4` to execute some of these commands. | ||
## Development | ||
- `npm install` install node dependencies | ||
- `npm run start` run server | ||
- `npm run test` run tests | ||
- `npm run build` build component | ||
- `npm run lint` lint the JS code | ||
- `rackt release` publish component to npm (verify version in package.json) | ||
- `rackt pages` rebuild gh-pages branch | ||
### Install | ||
### Guidelines | ||
- Use pull requests to collaborate around new changes | ||
- Document changes in the project's [CHANGELOG](CHANGELOG.md) | ||
> Clone the project on your computer, and install [Node](https://nodejs.org). This project also uses [nvm](https://github.com/creationix/nvm). | ||
## LICENSE | ||
```sh | ||
nvm install | ||
# Then, install all project dependencies. | ||
npm install | ||
# Install the git hooks. | ||
./.githooks/deploy | ||
``` | ||
The MIT License (MIT) | ||
### Working on the project | ||
Copyright (c) 2016 Springload | ||
> Everything mentioned in the installation process should already be done. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
```sh | ||
# Make sure you use the right node version. | ||
nvm use | ||
# Start the server and the development tools. | ||
npm run start | ||
# Runs linting. | ||
npm run lint | ||
# Runs tests. | ||
npm run test | ||
# View other available commands with: | ||
npm run | ||
``` | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
### Releases | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
- Make a new branch for the release of the new version. | ||
- Update the [CHANGELOG](CHANGELOG.md). | ||
- Update the version number in `package.json`, following semver. | ||
- Make a PR and squash merge it. | ||
- Back on master with the PR merged, follow the instructions below. | ||
```sh | ||
npm run dist | ||
# Use irish-pub to check the package content. Install w/ npm install -g first. | ||
irish-pub | ||
npm publish | ||
``` | ||
- Finally, go to GitHub and create a release and a tag for the new version. | ||
- Done! |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
9319
6
2
75
3
20
59
2