build.js
function finishedInstall(err) {
  if (err) {
    throw new Error(err)
  }
  const dictionary = {}
  for (const i in list) {
    if (list[i]) {
      const name = list[i]
      const transformer = require('jstransformer-' + name) // eslint-disable-line import/no-dynamic-require
      const formats = transformer.inputFormats || [name]

      for (const n in formats) {
        if (formats[n]) {
          const format = formats[n]
          // Ensure the input format exists in the dictionary.
          if (!dictionary[format]) {
            dictionary[format] = []
          }

          // Add the package to the input format.
          dictionary[format].push('jstransformer-' + name)
        }
      }
    }
  }
  const sorted = sortJson(dictionary)
  fs.writeFileSync('dictionary.json', JSON.stringify(sorted, null, 2))
}
function finishedInstall(err) {
  if (err) {
    throw new Error(err)
  }
  const dictionary = {}
  for (const i in list) {
    if (list[i]) {
      const name = list[i]
      const transformer = require('jstransformer-' + name) // eslint-disable-line import/no-dynamic-require
      const formats = transformer.inputFormats || [name]

      for (const n in formats) {
        if (formats[n]) {
          const format = formats[n]
          // Ensure the input format exists in the dictionary.
          if (!dictionary[format]) {
            dictionary[format] = []
          }

          // Add the package to the input format.
          dictionary[format].push('jstransformer-' + name)
        }
      }
    }
  }
  const sorted = sortJson(dictionary)
  fs.writeFileSync('dictionary.json', JSON.stringify(sorted, null, 2))
}
function finishedInstall ( err ) { if ( err ) { throw new Error ( err ) } const dictionary = { } for ( const i in list ) { if ( list [ i ] ) { const name = list [ i ] const transformer = require ( 'jstransformer-' + name ) // eslint-disable-line import/no-dynamic-require const formats = transformer . inputFormats || [ name ] for ( const n in formats ) { if ( formats [ n ] ) { const format = formats [ n ] // Ensure the input format exists in the dictionary. if ( ! dictionary [ format ] ) { dictionary [ format ] = [ ] } // Add the package to the input format. dictionary [ format ] . push ( 'jstransformer-' + name ) } } } } const sorted = sortJson ( dictionary ) fs . writeFileSync ( 'dictionary.json' , JSON . stringify ( sorted , null , 2 ) ) }
Write the dictionary.json based on the installed modules.

@param {string} err The error that was reported.
Write the dictionary . json based on the installed modules .