@@ -41,14 +41,15 @@ function createIconset(folder, filenames, idPrefix = '') {
4141 }
4242
4343 const content = fs . readFileSync ( folder + filename , 'utf-8' ) ;
44- const path = content . match ( / < p a t h d = " ( [ ^ " ] * ) " / ) ;
44+ const path = content . match ( / < p a t h ( f i l l - r u l e = " e v e n o d d " c l i p - r u l e = " e v e n o d d " ) * d = " ( [ ^ " ] * ) " / ) ;
4545 if ( path ) {
46- const newPath = new svgpath ( path [ 1 ] )
46+ const newPath = new svgpath ( path [ 2 ] )
4747 . scale ( 1000 / 24 , 1000 / 24 )
4848 . round ( 0 )
4949 . toString ( ) ;
5050 const name = filename . replace ( '.svg' , '' ) . replace ( / \s / g, '-' ) . toLowerCase ( ) ;
51- output += `<g id="${ idPrefix } ${ name } "><path d="${ newPath } "></path></g>\n` ;
51+ const attrs = path [ 1 ] !== undefined ? path [ 1 ] : '' ;
52+ output += `<g id="${ idPrefix } ${ name } "><path d="${ newPath } "${ attrs } ></path></g>\n` ;
5253 }
5354 } ) ;
5455
@@ -118,8 +119,8 @@ import './version.js';
118119
119120const $_documentContainer = document.createElement('template');
120121
121- $_documentContainer.innerHTML = \`<vaadin-iconset name="lumo">
122- ${ createIconset ( folder , filenames , 'vaadin-icon :' ) }
122+ $_documentContainer.innerHTML = \`<vaadin-iconset name="lumo" size="1000" >
123+ ${ createIconset ( folder , filenames , 'lumo :' ) }
123124</vaadin-iconset>\`;\n\ndocument.head.appendChild($_documentContainer.content);\n` ;
124125
125126 fs . writeFile ( 'vaadin-iconset.js' , vaadinIcons , function ( err ) {
@@ -195,6 +196,13 @@ document.head.appendChild($_documentContainer.content);
195196 }
196197 } ) ;
197198
199+ const list = glyphs . map ( ( g ) => g . name ) ;
200+ fs . writeFile ( 'test/glyphs.json' , JSON . stringify ( list , null , 2 ) , function ( err ) {
201+ if ( err ) {
202+ return console . error ( err ) ;
203+ }
204+ } ) ;
205+
198206 // Cleanup
199207 fs . unlink ( 'lumo-icons.woff' , function ( err ) {
200208 if ( err ) {
0 commit comments