Skip to content

Commit a93726a

Browse files
committed
fix: replace font-awesome icons with utf-8 symbols as a workaround to problem with fonts bundling
1 parent 18a4f6f commit a93726a

5 files changed

Lines changed: 25 additions & 31 deletions

File tree

gulpfile.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
'use strict';
22

33
const gulp = require('gulp');
4-
const stylus = require('gulp-stylus');
5-
const gitignore = require('gulp-gitignore');
4+
const stylus = require('stylus');
65
const ghPages = require('gulp-gh-pages');
6+
const gitignore = require('gulp-gitignore');
7+
const gulpStylus = require('gulp-stylus');
78

89
const SAME_DIRECTORY = '.';
910

1011
gulp.task('stylus', () => {
1112
return gulp.src('**/*.styl')
1213
.pipe(gitignore())
13-
.pipe(stylus())
14+
.pipe(gulpStylus({
15+
define: {
16+
url: stylus.resolver()
17+
}
18+
}))
1419
.pipe(gulp.dest(SAME_DIRECTORY));
1520
});
1621

index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
NodeDestructiveEvent
1111
} from './src/branchy.types';
1212

13-
export * from './src/branchy.component';
13+
import {BranchyComponent} from './src/branchy.component'
1414

1515
export {
1616
TreeModel,
@@ -21,5 +21,6 @@ export {
2121
NodeRenamedEvent,
2222
NodeMovedEvent,
2323
NodeSelectedEvent,
24-
NodeDestructiveEvent
24+
NodeDestructiveEvent,
25+
BranchyComponent
2526
};

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"tree",
2121
"ng2",
2222
"angular2",
23+
"ng2-tree",
2324
"branch",
2425
"tree-view",
2526
"branchy"
@@ -37,13 +38,12 @@
3738
"deploy:demo": "npm run build:demo && gulp deploy"
3839
},
3940
"dependencies": {
40-
"@angular/common": "2.0.0-rc.3",
41-
"@angular/compiler": "2.0.0-rc.3",
42-
"@angular/core": "2.0.0-rc.3",
43-
"@angular/platform-browser": "2.0.0-rc.3",
44-
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
41+
"@angular/common": "2.0.0-rc.4",
42+
"@angular/compiler": "2.0.0-rc.4",
43+
"@angular/core": "2.0.0-rc.4",
44+
"@angular/platform-browser": "2.0.0-rc.4",
45+
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
4546
"es6-shim": "0.35.1",
46-
"font-awesome": "4.6.3",
4747
"lodash": "4.13.1",
4848
"reflect-metadata": "0.1.3",
4949
"rxjs": "5.0.0-beta.6",

src/branchy.component.styl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
node-folding(icon)
66
content icon
77
color color-dark-grey
8-
font-family primary-icons-font-family
98

109
// styles
1110
ul
@@ -57,6 +56,7 @@ li
5756
.folding
5857
width 25px
5958
display inline-block
59+
line-height 1px
6060
padding 0 5px
6161
font-weight bold
6262

@@ -72,7 +72,7 @@ li
7272

7373
&.node-leaf
7474
color color-black
75-
vertical-align top
76-
font-size 13px
75+
text-align center
76+
font-size 0.89em
7777
&:before
7878
node-folding(tag-icon)

src/common/styles/fonts.styl

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
@font-face
2-
font-family: 'FontAwesome';
3-
src: url(/node_modules/font-awesome/fonts/fontawesome-webfont.eot);
4-
src: url(/node_modules/font-awesome/fonts/fontawesome-webfont.eot?#iefix) format('embedded-opentype'),
5-
url(/node_modules/font-awesome/fonts/fontawesome-webfont.woff2) format('woff2'),
6-
url(/node_modules/font-awesome/fonts/fontawesome-webfont.woff) format('woff'),
7-
url(/node_modules/font-awesome/fonts/fontawesome-webfont.ttf) format('truetype'),
8-
url(/node_modules/font-awesome/fonts/fontawesome-webfont.svg#bariolthin) format('svg')
9-
font-weight normal
10-
font-style normal
11-
121
primary-font-family = "Helvetica Neue", Helvetica, Arial, sans-serif
13-
primary-icons-font-family = 'FontAwesome'
142

15-
tag-icon = '\f02b'
16-
folder-icon = '\f114'
17-
folder-opened-icon = '\f115'
18-
rename-icon = '\f040'
19-
remove-icon = '\f00d'
3+
tag-icon = '\25CF'
4+
folder-icon = '\25B6'
5+
folder-opened-icon = '\25BC'
6+
rename-icon = '\270E'
7+
remove-icon = '\2716'

0 commit comments

Comments
 (0)