text: #!usr/bin/env node
  
  const { basename } = require('path');
  const data = require('emojione/emoji.json');
  
  const COMMENT = `
  // Do not edit
  // This file has been generated by ${basename(__filename)}
  `;
  
  const items = Object.keys(data).map(key => {
    const emoji = data[key];
    const shortnames = emoji.shortname_alternates.filter(
      s => !s.endsWith('skin_tone:') && !s.match(/_tone\d:$/)
    );
    shortnames.unshift(emoji.shortname);
    console.error(shortnames);
    const codepoint = emoji.code_points.output;
    return {
      codepoint,
      short: shortnames,
      unicode: String.fromCodePoint(
        ...codepoint.split('-').map(c => parseInt(c, 16))
      )
    };
  });
  
  items.sort((a, b) => b.codepoint.length - a.codepoint.length);
  
  const str = items
    .map(item => JSON.stringify([item.codepoint, item.short, item.unicode]))
    .join(',\n');
  
  console.log(`${COMMENT}module.exports = [\n${str}\n];`);
  console.error('count:', Object.keys(data).length);
  