@fortawesome/vue-fontawesome 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.1.2](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.2) - 2018-10-29
9
+
10
+ ### Added
11
+ * Adding ES module to package
12
+
13
+ ---
14
+
8
15
  ## [0.1.1](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.1) - 2018-07-16
9
16
 
10
17
  ### Fixed
package/DEVELOPMENT.md CHANGED
@@ -16,7 +16,8 @@ test | Execute unit tests
16
16
  1. Update `package.json` and change `version`
17
17
  1. Update `README.md` and add any contributors
18
18
  1. Update the `CHANGELOG.md`
19
- 1. `npm run dist`
19
+ 1. `npm publish`
20
+ 1. `git add index.js index.es.js`
20
21
  1. `git commit -a -m 'Release VERSION'`
21
22
  1. `git push`
22
23
  1. Create a [new release](https://github.com/FortAwesome/vue-fontawesome/releases/new) with CHANGELOG details
package/README.md CHANGED
@@ -35,6 +35,8 @@
35
35
  * [Register your components first](#register-your-components-first)
36
36
  * [Basic](#basic)
37
37
  * [Advanced](#advanced)
38
+ - [Integrating with other tools and frameworks](#integrating-with-other-tools-and-frameworks)
39
+ * [Nuxt.js](#nuxtjs)
38
40
  - [FAQ](#faq)
39
41
  * [Why so explicit (the :icon="['far', 'coffee']" syntax)?](#why-so-explicit-the-iconfar-coffee-syntax)
40
42
  + [How about a separate property for the prefix?](#how-about-a-separate-property-for-the-prefix)
@@ -127,10 +129,10 @@ The following examples are based on a project configured with [vue-cli](https://
127
129
  import Vue from 'vue'
128
130
  import App from './App'
129
131
  import { library } from '@fortawesome/fontawesome-svg-core'
130
- import { faCoffee } from '@fortawesome/free-solid-svg-icons'
132
+ import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
131
133
  import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
132
134
 
133
- library.add(faCoffee)
135
+ library.add(faUserSecret)
134
136
 
135
137
  Vue.component('font-awesome-icon', FontAwesomeIcon)
136
138
 
@@ -149,7 +151,7 @@ new Vue({
149
151
  ```javascript
150
152
  <template>
151
153
  <div id="app">
152
- <font-awesome-icon icon="coffee" />
154
+ <font-awesome-icon icon="user-secret" />
153
155
  </div>
154
156
  </template>
155
157
 
@@ -200,16 +202,26 @@ The `icon` property of the `FontAwesomeIcon` component can be used in the follow
200
202
 
201
203
  ```javascript
202
204
  <font-awesome-icon icon="spinner" />
205
+ <font-awesome-icon icon="align-left" />
206
+
203
207
  <font-awesome-icon :icon="['fas', 'spinner']" /> # Same as above
208
+ <font-awesome-icon :icon="['fas', 'align-left']" /> # Same as above
204
209
  ```
205
210
 
206
- For the above to work you must add the `spinner` icon to the library.
211
+ For the above to work you must add the `spinner` and `align-left` icon to the library.
207
212
 
208
213
  ```javascript
209
214
  import { library } from '@fortawesome/fontawesome-svg-core'
210
- import { faSpinner } from '@fortawesome/free-solid-svg-icons'
215
+ import { faSpinner, faAlignLeft } from '@fortawesome/free-solid-svg-icons'
211
216
 
212
- library.add(faSpinner)
217
+ library.add(faSpinner, faAlignLeft)
218
+ ```
219
+
220
+ In the event that you are using an icon with a multi-word name please note that
221
+ you would need to pass in the icon name using _kebab-case_ as opposed to _camelCase_.
222
+
223
+ ```javascript
224
+ <font-awesome-icon icon="address-card" /> # import { faAddressCard } from '@fortawesome/free-solid-svg-icons'
213
225
  ```
214
226
 
215
227
  #### Explicit prefix (note the Vue bind shorthand because this uses an array)
@@ -343,7 +355,7 @@ library** before you bootstrap your Vue application.
343
355
 
344
356
  ```
345
357
  import Vue from 'vue'
346
- import { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText } from 'vue-fontawesome'
358
+ import { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText } from '@fortawesome/vue-fontawesome'
347
359
 
348
360
  Vue.component('font-awesome-icon', FontAwesomeIcon)
349
361
  Vue.component('font-awesome-layers', FontAwesomeLayers)
@@ -429,7 +441,7 @@ Spin and pulse [animation](https://fontawesome.com/how-to-use/on-the-web/styling
429
441
  ```html
430
442
  <font-awesome-layers class="fa-lg">
431
443
  <font-awesome-icon icon="circle" />
432
- <font-awesome-icon icon="check" transform="shrink-6" style="color: white;" />
444
+ <font-awesome-icon icon="check" transform="shrink-6" :style="{ color: 'white' }" />
433
445
  </font-awesome-layers>
434
446
  ```
435
447
 
@@ -442,6 +454,49 @@ Spin and pulse [animation](https://fontawesome.com/how-to-use/on-the-web/styling
442
454
  </font-awesome-layers>
443
455
  ```
444
456
 
457
+ ## Integrating with other tools and frameworks
458
+
459
+ ### Nuxt.js
460
+
461
+ Install `@fortawesome/vue-fontawesome` and `@fortawesome/fontawesome-svg-core` and any icon packages.
462
+
463
+ ```
464
+ npm install --save @fortawesome/vue-fontawesome @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons
465
+ ```
466
+
467
+ Inside your Nuxt.js project add a `plugins/fontawesome.js` file.
468
+
469
+ ```javascript
470
+ import Vue from 'vue'
471
+ import { library, config } from '@fortawesome/fontawesome-svg-core'
472
+ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
473
+ import { fas } from '@fortawesome/free-solid-svg-icons'
474
+
475
+ // This is important, we are going to let Nuxt.js worry about the CSS
476
+ config.autoAddCss = false
477
+
478
+ // You can add your icons directly in this plugin. See other examples for how you
479
+ // can add other styles or just individual icons.
480
+ library.add(fas)
481
+
482
+ // Register the component globally
483
+ Vue.component('font-awesome-icon', FontAwesomeIcon)
484
+ ```
485
+
486
+ Modify `nuxt.config.js` adding to the `css` and `plugins` sections.
487
+
488
+ ```javascript
489
+ css: [
490
+ '@fortawesome/fontawesome-svg-core/styles.css'
491
+ ]
492
+ ```
493
+
494
+ ```javascript
495
+ plugins: [
496
+ '~/plugins/fontawesome.js'
497
+ ]
498
+ ```
499
+
445
500
  ## FAQ
446
501
 
447
502
  ### Why so explicit (the :icon="['far', 'coffee']" syntax)?
package/UPGRADING.md CHANGED
@@ -47,18 +47,18 @@ import solid from '@fortawesome/fontawesome-free-solid'
47
47
  import faTwitter from '@fortawesome/fontawesome-free-brands/faTwitter'
48
48
  import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
49
49
 
50
- import fontaweome.library.add(solid, faTwitter)
50
+ fontawesome.library.add(solid, faTwitter)
51
51
  ```
52
52
 
53
53
  New way:
54
54
 
55
55
  ```javascript
56
56
  import { library } from '@fortawesome/fontawesome-svg-core'
57
- import { fas } from '@fortawesome/fontawesome-free-solid'
57
+ import { fas } from '@fortawesome/free-solid-svg-icons'
58
58
  import { faTwitter } from '@fortawesome/free-brands-svg-icons'
59
59
  import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
60
60
 
61
- import library.add(fas, faTwitter)
61
+ library.add(fas, faTwitter)
62
62
  ```
63
63
 
64
64
  This is also a valid way to import icons that works if your tool does not support tree shaking:
@@ -10,26 +10,26 @@
10
10
  "build": "node build/build.js"
11
11
  },
12
12
  "dependencies": {
13
- "vue": "^2.5.16"
13
+ "vue": "^2.5.17"
14
14
  },
15
15
  "devDependencies": {
16
- "@fortawesome/fontawesome-svg-core": "^1.2.0",
17
- "@fortawesome/free-brands-svg-icons": "^5.1.0",
18
- "@fortawesome/free-regular-svg-icons": "^5.1.0",
19
- "@fortawesome/free-solid-svg-icons": "^5.1.0",
20
- "@fortawesome/vue-fontawesome": "^0.1.0",
21
- "ajv": "^6.5.0",
16
+ "@fortawesome/fontawesome-svg-core": "^1.2.6",
17
+ "@fortawesome/free-brands-svg-icons": "^5.4.1",
18
+ "@fortawesome/free-regular-svg-icons": "^5.4.1",
19
+ "@fortawesome/free-solid-svg-icons": "^5.4.1",
20
+ "@fortawesome/vue-fontawesome": "^0.1.1",
21
+ "ajv": "^6.5.4",
22
22
  "autoprefixer": "^7.1.2",
23
23
  "babel-core": "^6.26.3",
24
24
  "babel-helper-vue-jsx-merge-props": "^2.0.3",
25
- "babel-loader": "^7.1.1",
25
+ "babel-loader": "^7.1.5",
26
26
  "babel-plugin-syntax-jsx": "^6.18.0",
27
27
  "babel-plugin-transform-runtime": "^6.22.0",
28
28
  "babel-plugin-transform-vue-jsx": "^3.5.0",
29
29
  "babel-preset-env": "^1.7.0",
30
30
  "babel-preset-stage-2": "^6.22.0",
31
31
  "chalk": "^2.4.1",
32
- "copy-webpack-plugin": "^4.0.1",
32
+ "copy-webpack-plugin": "^4.5.3",
33
33
  "css-loader": "^0.28.11",
34
34
  "extract-text-webpack-plugin": "^3.0.0",
35
35
  "file-loader": "^1.1.4",
@@ -38,22 +38,22 @@
38
38
  "node-notifier": "^5.1.2",
39
39
  "optimize-css-assets-webpack-plugin": "^3.2.0",
40
40
  "ora": "^1.2.0",
41
- "portfinder": "^1.0.13",
41
+ "portfinder": "^1.0.17",
42
42
  "postcss-import": "^11.0.0",
43
- "postcss-loader": "^2.1.5",
43
+ "postcss-loader": "^2.1.6",
44
44
  "postcss-url": "^7.3.2",
45
45
  "rimraf": "^2.6.0",
46
- "semver": "^5.3.0",
46
+ "semver": "^5.6.0",
47
47
  "shelljs": "^0.7.6",
48
- "uglifyjs-webpack-plugin": "^1.2.5",
48
+ "uglifyjs-webpack-plugin": "^1.3.0",
49
49
  "url-loader": "^0.5.8",
50
- "vue-loader": "^13.7.2",
50
+ "vue-loader": "^13.7.3",
51
51
  "vue-style-loader": "^3.0.1",
52
- "vue-template-compiler": "^2.5.16",
52
+ "vue-template-compiler": "^2.5.17",
53
53
  "webpack": "^3.12.0",
54
54
  "webpack-bundle-analyzer": "^2.13.1",
55
- "webpack-dev-server": "^2.9.1",
56
- "webpack-merge": "^4.1.0"
55
+ "webpack-dev-server": "^2.11.3",
56
+ "webpack-merge": "^4.1.4"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 6.0.0",
@@ -2,7 +2,7 @@
2
2
  <div id="app">
3
3
  <main class="w-100 min-vh-100 bg-gray8 white sans-serif pa6 flex flex-column justify-center items-center">
4
4
  <div class="mw8 center overflow-hidden">
5
- <h2 class="tc ttu tracked3 b f2 mt0 mb2 teal0 o-30">react-fontawesome</h2>
5
+ <h2 class="tc ttu tracked3 b f2 mt0 mb2 teal0 o-30">vue-fontawesome</h2>
6
6
 
7
7
  <ul class="list ma0 pa0 flex flex-row flex-wrap teal4">
8
8
  <li class="pv3 ph2 ma0 link grow">