nl_tokens: Build font icons from SVG files and optionally make scss and demo templates .
pl_tokens: function icons ( done ) { const stream = gulp . src ( config . src ) . pipe ( iconfont ( { fontName : config . iconName , appendUniconde : true , formats : config . formats , timestamp : config . useTimestamp ? getTimestamp ( ) : 0 , autohint : config . autohint , normalize : config . normalize , } ) ) ; // write icons to disk stream . pipe ( gulp . dest ( config . dest ) ) ; // reload browser core . events . emit ( 'reload' ) ; if ( config . templates . enabled && config . templates . sets . length ) { stream . on ( 'glyphs' , ( glyphs ) => { // console.log(glyphs); const iconData = { glyphs : glyphs . map ( glyph => ( { // returns the object name : glyph . name , <mask> : glyph . unicode [ 0 ] . toString ( 16 ) . toUpperCase ( ) , } ) ) , fontName : config . iconName , fontPath : config . fontPathPrefix , classNamePrefix : config . classNamePrefix , } ; Promise . all ( config . templates . sets . map ( set => new Promise ( ( resolve , reject ) => { processIconTemplate ( set . src , set . dest , iconData , ( err ) => { if ( err ) reject ( ) ; resolve ( ) ; } ) ; } ) ) ) . then ( ( ) => done ( ) ) ; } ) ; } else { done ( ) ; } }