Commit Graph

28 Commits

Author SHA1 Message Date
Cole Bemis
14c796917d
build: Update linting config 2017-11-19 18:01:04 -08:00
Cole Bemis
c9552b6916
fix: Remove unecessary whitespace from SVG contents
```js
/* BEFORE */
{ circle: "\n  <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n" }

/* AFTER */
{ circle: "<circle cx=\"12\" cy=\"12\" r=\"10\"></circle>" }
```
2017-11-19 16:29:52 -08:00
Cole Bemis
f243624fbd
feat: Update API
BREAKING CHANGE: 

Each icon in the `feather.icons` object is now an `Icon` object with a `name`, `contents`, `tags` and `attrs` property.
```js
/* BEFORE */
feather.icons.x
// '<line ... /><line ... />'

/* AFTER */
feather.icons.x
// {
//    name: 'x',
//    contents: '<line ... /><line ... />`,
//    tags: ['cancel', 'close', 'delete', 'remove'],
//    attrs: {
//      class: 'feather feather-x',
//      xmlns: 'http://www.w3.org/2000/svg',
//      width: 24,
//      height: 24,
//      viewBox: '0 0 24 24',
//      fill: 'none',
//      stroke: 'currentColor',
//      'stroke-width': 2,
//      'stroke-linecap': 'round',
//      'stroke-linejoin': 'round',
//    }
// }
```

`feather.toSvg()` has been deprecated in favor of `feather.icons[name].toSvg()`:
```js
/* BEFORE */
feather.toSvg('x')

/* AFTER */
feather.icons.x.toSvg()
```

`feather.replace()` now copies all attributes on the placeholder element (i.e. `<i>`) to the `<svg>` tag instead of just `class` and `id`:

```html
<i data-feather="circle" id="my-circle" class="foo bar" stroke-width="1"></i>
<!--
<i> will be replaced with:
<svg id="my-circle" class="feather feather-circle foo bar" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>
-->
```
2017-11-18 20:00:16 -08:00
Cole Bemis
0dc2bf5c9d
build: Add process-svgs script (#216) 2017-11-13 08:13:11 -08:00
Cole Bemis
998b2e9add chore: Add lint script 2017-07-03 15:53:34 -07:00
Cole Bemis
ef3e69b327 build: Build js files with webpack 2017-07-03 15:53:34 -07:00
Cole Bemis
75068f6625 chore: Update package.json 2017-07-03 15:53:34 -07:00
Cole Bemis
704870bb12 refactor: Remove website code from master branch 2017-07-03 15:53:34 -07:00
Cole Bemis
adbc129119 chore: automate releases 2017-06-05 00:28:24 -07:00
Cole Bemis
1356b013b7 Update package.json 2017-06-04 01:03:46 -07:00
Cole Bemis
5554766f88 Change npm name 2017-06-01 23:20:59 -07:00
Cole Bemis
7fec7374be Clean up package.json 2017-05-30 20:29:32 -07:00
Cole Bemis
714b8d3aff Update package.json 2017-05-23 23:41:09 -07:00
Cole Bemis
a254c688d9 Clean up package.json 2017-05-23 20:46:38 -07:00
Cole Bemis
b25a67dc0f Add svgo 2017-05-23 13:59:21 -07:00
Cole Bemis
873c50411f Refactor build process 2017-05-13 11:30:06 -07:00
Cole Bemis
31337f00cc Watch package.json 2017-05-13 02:44:55 -07:00
Cole Bemis
49bc7a1735 Add npm scripts 2017-05-13 02:36:11 -07:00
Cole Bemis
f1974091f4 Update version number 2017-05-12 21:34:50 -07:00
Cole Bemis
41b8ca19a9 Add package.json 2017-02-28 15:40:11 -08:00
Cole Bemis
e1ea1aada8 Clear gh-pages branch 2017-02-21 22:45:06 -08:00
Cole Bemis
a85b7b6369 Create Icon component 2017-01-28 22:01:30 -08:00
Cole Bemis
4c6b7ad3b8 Add vuex 2017-01-28 22:01:18 -08:00
Cole Bemis
29abfc96cf Install webpack-dev-server 2017-01-28 15:31:46 -08:00
Cole Bemis
2f70a91dce Set up vie-loader 2017-01-28 15:15:20 -08:00
Cole Bemis
9ce3c68a9b Import Vue 2017-01-28 15:03:26 -08:00
Cole Bemis
9cbd7ca24d Set up babel 2017-01-28 14:46:21 -08:00
Cole Bemis
4cf99d1d0a Install webpack 2017-01-28 13:44:34 -08:00