diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000..54dd7b4 --- /dev/null +++ b/bin/dev @@ -0,0 +1,3 @@ +#!/bin/bash + +yarn watch \ No newline at end of file diff --git a/example/webpack/bin/dev b/example/webpack/bin/dev index 24c0358..54dd7b4 100755 --- a/example/webpack/bin/dev +++ b/example/webpack/bin/dev @@ -1,4 +1,3 @@ #!/bin/bash -yarn build -yarn dev \ No newline at end of file +yarn watch \ No newline at end of file diff --git a/example/webpack/package.json b/example/webpack/package.json index e16d7ca..db65919 100644 --- a/example/webpack/package.json +++ b/example/webpack/package.json @@ -8,6 +8,7 @@ "build": { "patterns": [ "src/**/*.js", + "src/**/*.vue", "../../index.js" ] } diff --git a/example/webpack/src/library.js b/example/webpack/src/library.js index fd57c4c..4e39b9f 100644 --- a/example/webpack/src/library.js +++ b/example/webpack/src/library.js @@ -2,9 +2,9 @@ import Vue from 'vue' import App from './library/App.vue' import fontawesome from '@fortawesome/fontawesome' import brands from '@fortawesome/fontawesome-brands' -import { faCoffee, faCog } from '@fortawesome/fontawesome-solid' +import { faCoffee, faCog, faSpinner, faQuoteLeft, faSquare, faCheckSquare } from '@fortawesome/fontawesome-solid' -fontawesome.library.add(brands, faCoffee, faCog) +fontawesome.library.add(brands, faCoffee, faCog, faSpinner, faQuoteLeft, faSquare, faCheckSquare) new Vue({ el: '#app', diff --git a/example/webpack/src/library/App.vue b/example/webpack/src/library/App.vue index 677ec41..4e0cb6c 100644 --- a/example/webpack/src/library/App.vue +++ b/example/webpack/src/library/App.vue @@ -4,7 +4,28 @@ + + + + +
+

+ ...tomorrow we + will run faster, stretch out our arms farther...And then one fine morning— So we beat on, boats + against the current, borne back ceaselessly into the past. +

+
+
+

+

    +
  • List icons
  • +
  • can be used
  • +
  • as bullets
  • +
  • in lists
  • +
+

+
@@ -24,8 +45,14 @@ export default { #app { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - text-align: center; color: #2c3e50; margin-top: 60px; + text-align: center; +} + +p { + display: inline-block; + width: 250px; + text-align: left; } diff --git a/package.json b/package.json index 07f1dac..203cbb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fortawesome/vue-fontawesome", - "version": "0.0.3", + "version": "0.0.4", "main": "index.js", "author": "robmadole ", "license": "MIT", diff --git a/src/components/icon.js b/src/components/icon.js index 14e8021..6a0ab86 100644 --- a/src/components/icon.js +++ b/src/components/icon.js @@ -5,23 +5,55 @@ export default { name: 'FontAwesomeIcon', props: { - name: { - type: String, - default: '' + border: { + type: Boolean, + default: false }, - pack: { + fixedWidth: { + type: Boolean, + default: false + }, + flip: { type: String, - default: 'fa' + default: null, + validator: (value) => ['horizontal', 'vertical', 'both'].indexOf(value) > -1 }, iconDefinition: { type: Object, default: null }, - spin: { + listItem: { type: Boolean, default: false }, - fixedWidth: { + pack: { + type: String, + default: 'fa' + }, + pull: { + type: String, + default: null, + validator: (value) => ['right', 'left'].indexOf(value) > -1 + }, + pulse: { + type: Boolean, + default: false + }, + name: { + type: String, + default: '' + }, + rotation: { + type: Number, + default: null, + validator: (value) => [90, 180, 270].indexOf(value) > -1 + }, + size: { + type: String, + default: null, + validator: (value) => ['lg', 'xs', 'sm', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x'].indexOf(value) > -1 + }, + spin: { type: Boolean, default: false } @@ -50,7 +82,15 @@ export default { classList () { let classes = { 'fa-spin': this.spin, - 'fa-fw': this.fixedWidth + 'fa-pulse': this.pulse, + 'fa-fw': this.fixedWidth, + 'fa-border': this.border, + 'fa-li': this.listItem, + 'fa-flip-horizontal': this.flip === 'horizontal' || this.flip === 'both', + 'fa-flip-vertical': this.flip === 'vertical' || this.flip === 'both', + [`fa-${this.size}`]: this.size !== null, + [`fa-rotate-${this.rotation}`]: this.rotation !== null, + [`fa-pull-${this.pull}`]: this.pull !== null } return Object.keys(classes)