{"version":3,"sources":["jsdelivr-header.js","/npm/textlint-bundler@0.2.0/lib/textlint-bundler.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACLA,MAAM,MAAQ,QAAQ,SAChB,IAAM,QAAQ,OACd,KAAO,QAAQ,QACf,OAAS,QAAQ,YAEjB,IAAM,KACV,MAAM,EAAM,KAAK,mcAqBhB,CACC,MAAO,CACL,MAAO,CACL,KAAM,UACN,MAAO,QAIb,QAAQ,IAAI,MAAM,KAAK,MAAM,sBAC7B,MAAM,EAAU,MAAM,QACtB,OAAO,EAAI,MAAO,GACjB,MAAM,IACL,GAAI,EAAM,cAAe,CACvB,MAAM,EAAO,EAAM,SACnB,QAAQ,KAAK,MAAM,QAAQ,SAAd,CAAwB,WAAY,oBACjD,QAAQ,IAAI,MAAM,QAAQ,OAAd,CAAsB,EAAK,SAAS,KAAK,KACvD,CACA,QAAQ,IAAI,MAAM,KAAK,MAAM,YAC7B,QAAQ,IAAI,+DAA+D,IAE5E,OAAO,IACN,GAAgC,mBAArB,EAAO,UAA2B,CAC3C,QAAQ,MAAM,MAAM,KAAK,IAAI,SAAU,kBACvC,MAAM,EAAO,EAAO,SACpB,QAAQ,IAAI,EAAK,OAAO,KAAK,IAC/B,MACE,QAAQ,MAAM,MAAM,KAAK,IAAI,SAAU,EAAO,OAAS,GACvD,QAAQ,IAAI,EAAO,SAAW,GAChC,IAED,SAAQ,KACP,EAAQ,MAAM,GACf,EAEH,OAAO,QAAU,CAAC","file":"/npm/textlint-bundler@0.2.0/lib/textlint-bundler.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/textlint-bundler@0.2.0/lib/textlint-bundler.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\nconst chalk = require('chalk');\nconst ora = require('ora');\nconst meow = require('meow');\nconst bundle = require('./bundle');\n\nconst run = () => {\n  const cli = meow(`\n    Usage\n      1. Install preset what you want to bundle\n        $ npm insall textlint-rule-preset-xxxxx\n\n      2. Update \\`textlint.preset\\` in your \\`package.json\\`\n        Ex:\n        \\`\n          textlint: {\n            preset: 'japanese\n          }\n        \\`\n\n      3. run\n        $ textlint-bundler\n\n      bundled file and example will be created in \\`dist\\` directory\n\n    Options\n      --debug, -d Bundle with debug option\n\n`, {\n    flags: {\n      debug: {\n        type: 'boolean',\n        alias: 'd'\n      }\n    }\n  });\n  console.log(chalk.bold.white('Start Bundling...'))\n  const spinner = ora().start();\n  bundle(cli.flags, spinner)\n  .then((stats) => {\n    if (stats.hasWarnings()) {\n      const info = stats.toJson();\n      console.warn(chalk.keyword('orange')('Warning'), 'webpack warnings');\n      console.log(chalk.keyword('gray')(info.warnings.join(\"\")));\n    }\n    console.log(chalk.bold.green('Success'));\n    console.log(\"Run `npx http-server ./dist -o /example.html` to see example\");\n  })\n  .catch((reason) => {\n    if (typeof reason.hasErrors === 'function' ) {\n      console.error(chalk.bold.red('Error'), 'webpack errors');\n      const info = reason.toJson();\n      console.log(info.errors.join(\"\"));\n    } else {\n      console.error(chalk.bold.red('Error'), reason.stack || reason);\n      console.log(reason.details || '');\n    }\n  })\n  .finally(() => {\n    spinner.stop();\n  })\n}\nmodule.exports = {run}"]}