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by jsDelivr using Terser v5.39.0.\n * Original file: /npm/snap@0.11.0/snap.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\n'use strict';\r\n\r\nconst cli = require('commander');\r\nconst chalk = require('chalk');\r\n\r\nconst pkg = require('./package.json');\r\nconst snap = require('./tasks/snap');\r\nconst save = require('./tasks/save');\r\nconst ls = require('./tasks/ls');\r\nconst show = require('./tasks/show');\r\nconst rm = require('./tasks/rm');\r\n\r\n// cli info\r\ncli\r\n  .version(pkg.version, '-v, --version')\r\n  .usage(`${chalk.yellow('<command>')} ${chalk.gray('or')} snap ${chalk.yellow('<boilerplate-name> <project-directory> [options]')}`)\r\n  .on('--help', () => {\r\n    console.log('\\nFor example, to save a React starter project from GitHub for future use...');\r\n    console.log(`  snap save react https://github.com/user/react-starter.git`);\r\n    console.log(`  snap react my-project`);\r\n    console.log('  cd my-project\\n');\r\n    console.log('If you encounter any problems, please open an issue:');\r\n    console.log(`  ${chalk.cyan('https://github.com/jolaleye/snap/issues')}\\n`);\r\n  });\r\n\r\n// start up a new project\r\ncli\r\n  .arguments('<boilerplate-name> <project-directory>')\r\n  .option('-i, --install', 'run \\'npm install\\' after creating a project')\r\n  .action(snap);\r\n\r\n// save - save a directory or repository to a name\r\ncli\r\n  .command('save <name> [source]')\r\n  .usage(chalk.yellow('<name> [source] [options]'))\r\n  .description('save a directory or respository')\r\n  .option('-o, --overwrite', 'overwrite an existing boilerplate with the same name')\r\n  .on('--help', () => {\r\n    console.log(`\\n${chalk.yellow('[source]')} can be...`);\r\n    console.log(`  - a local path to a directory: ${chalk.cyan('./starter')}`);\r\n    console.log(`  - a Git repository URL: ${chalk.cyan('https://github.com/user/starter.git')}`);\r\n    console.log('If no source is provided, it will default to the current directory.\\n');\r\n  })\r\n  .action(save);\r\n\r\n// ls - list the available boilerplates\r\ncli\r\n  .command('ls')\r\n  .usage(' ')\r\n  .description('list saved boilerplates')\r\n  .action(ls);\r\n\r\n// show - display the file structure of a boilerplate\r\ncli\r\n  .command('show <name>')\r\n  .usage(`${chalk.yellow('<name>')}`)\r\n  .description('display the file structure of a boilerplate')\r\n  .action(show);\r\n\r\n// rm - delete a saved boilerplate\r\ncli\r\n  .command('rm <names...>')\r\n  .usage(`${chalk.yellow('<names...>')}`)\r\n  .description('delete a saved boilerplate')\r\n  .on('--help', () => {\r\n    console.log(`\\n${chalk.yellow('<names...>')} can be one or more names of saved boilerplates.`);\r\n    console.log(`You can check out what you\\'ve saved with ${chalk.yellow('snap ls')}.\\n`);\r\n  })\r\n  .action(rm);\r\n\r\n// parse arguments\r\ncli.parse(process.argv);\r\n"]}