nl_tokens: Convert public_api . json to public_api . ts
pl_tokens: function generatePublicApiTs ( ) { const configFile = <mask> . resolve ( __dirname , '../src/ng5-slider/lib/public_api.json' ) ; const tsFile = path . resolve ( __dirname , '../src/ng5-slider/lib/public_api.ts' ) ; const config = JSON . parse ( fs . readFileSync ( configFile , { encoding : 'utf8' } ) ) ; let tsFileContent = '' ; for ( let exportDef of config . exports ) { if ( exportDef . what instanceof Array ) { const whats = exportDef . what . join ( ', ' ) ; tsFileContent += ` ${ whats } ${ exportDef . file } \n ` ; } else { tsFileContent += ` ${ exportDef . what } ${ exportDef . file } \n ` ; } } fs . writeFileSync ( tsFile , tsFileContent , { encoding : 'utf8' } ) ; }