message: chore: updage style extractor script
diff: +/* eslint-disable @typescript-eslint/no-unused-vars */
  const postcss = require('postcss')
  const fs = require('fs')
  const path = require('path')
  @@ -10,12 +11,19 @@ const path = require('path')
  function getIdsAndClassNames(root) {
  const result = new Set()
  _fn(root)
  - return Array.from(result).map(x => `'${x}',`).join('\n')
  + return Array.from(result)
  + .map(x => `'${x}',`)
  + .join('\n')
  function _fn(node) {
  - if (!node) { return }
  - if (node.className) {
  - node.className.split(/\s+/).filter(Boolean).reduce((r, n) => r.add('.' + n), result)
  + if (!node) {
  + return
  + }
  + if (typeof node.className === 'string') {
  + node.className
  + .split(/\s+/)
  + .filter(Boolean)
  + .reduce((r, n) => r.add('.' + n), result)
  }
  if (node.id) {
  result.add('#' + node.id)
  @@ -36,6 +44,10 @@ function getStylesByAttrs (attrs, from, to) {
  const lattrs = attrs.map(name => name.toLocaleLowerCase())
  fs.readFile(from, (err, source) => {
  + if (err) {
  + console.error(err)
  + process.exit(1)
  + }
  const root = postcss.parse(source, { from, to })
  root.walkRules(rule => {
  const selector = rule.selector.toLowerCase()
  