@@ -214,27 +214,27 @@ const writeFiles = function(options) {
214214 path . resolve ( dir , 'index.js' ) ,
215215 output
216216 ) ;
217- return ;
217+ } else {
218+ Object . keys ( auxMap ) . forEach ( function ( type ) {
219+ const dir = path . resolve (
220+ __dirname , '..' ,
221+ 'output' , 'unicode-' + version , type
222+ ) ;
223+ if ( ! hasKey ( dirMap , type ) ) {
224+ dirMap [ type ] = [ ] ;
225+ }
226+ fs . mkdirSync ( dir , { recursive : true } ) ;
227+ // `categories/index.js`
228+ // or `Bidi_Class/index.js`
229+ // or `bidi-brackets/index.js`
230+ // or `Names/index.js`
231+ const flatRuns = samePropertyRuns ( auxMap [ type ] ) ;
232+ const output = `module.exports=require('../decode-property-map.js')(${ gzipInline (
233+ flatRuns
234+ ) } )`;
235+ fs . writeFileSync ( path . resolve ( dir , "index.js" ) , output ) ;
236+ } ) ;
218237 }
219- Object . keys ( auxMap ) . forEach ( function ( type ) {
220- const dir = path . resolve (
221- __dirname , '..' ,
222- 'output' , 'unicode-' + version , type
223- ) ;
224- if ( ! hasKey ( dirMap , type ) ) {
225- dirMap [ type ] = [ ] ;
226- }
227- fs . mkdirSync ( dir , { recursive : true } ) ;
228- // `categories/index.js`
229- // or `Bidi_Class/index.js`
230- // or `bidi-brackets/index.js`
231- // or `Names/index.js`
232- const flatRuns = samePropertyRuns ( auxMap [ type ] ) ;
233- const output = `module.exports=require('../decode-property-map.js')(${ gzipInline (
234- flatRuns
235- ) } )`;
236- fs . writeFileSync ( path . resolve ( dir , "index.js" ) , output ) ;
237- } ) ;
238238 return dirMap ;
239239} ;
240240
0 commit comments