Skip to content

Commit

Permalink
Bump to version 3.0.0
Browse files Browse the repository at this point in the history
- Update upgrading guide
  • Loading branch information
omacranger committed Sep 13, 2021
1 parent db55b3d commit 8bcd5b9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
21 changes: 18 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# Upgrading Versions

## 2.0 to 3.0
3.0 has updated the default export to be a little more friendly for modern tooling. Anywhere you were previously using
`const fontawesomeSubset = require('fontawesome-subset');` may need to be updated to the newer format,
`import { fontawesomeSubset } from "fontawesome-subset";`.
3.0 has updated the default export to be an object for future upgrades / maintainability. Anywhere you were previously
using a singular import you'll need to update to destructure or pull from the object instead. Example below:

Old:
```javascript
const fontawesomeSubset = require('fontawesome-subset');
```

New:
```javascript
const { fontawesomeSubset } = require("fontawesome-subset");
```

New (TypeScript / Module Syntax):
```typescript
import { fontawesomeSubset } from "fontawesome-subset";
```


## 1.x to 2.0
Version 2.0 of fontawesome-subset removes the required dependency for `@fortawesome/fontawesome-free`.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fontawesome-subset",
"version": "3.0.0-beta.1",
"version": "3.0.0",
"description": "Utility to create subsets for FontAwesome and FontAwesome Pro.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 8bcd5b9

Please sign in to comment.