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EAAU,CACZ,KAAQ,KAAK,WAAW,MAAM,KAAK,MAAM,GAAG,KAAK,KACjD,OAAU,KAAK,OACf,MAAS,KAAK,MACd,YAAe,KAAK,YACpB,KAAQ,KAAK,MAGf,KAAK,SAAU,gBAAiB,eAAgB,EACjD,EAMA,KAAM,WACL,IAAI,EAAU,CACZ,KAAQ,KAAK,YAGf,KAAK,SAAU,gBAAiB,eAAgB,EACjD,EAMA,SAAU,WACT,KAAK,KAAM,qBAAsB,oBAClC,EAMA,QAAS,WACR,IAAI,EAAS,CACX,OAAS,EACT,KAAO,EACP,YAAe,KAAK,QAAS,gBAC7B,aAAe,EACf,SAAY,WACX,QAAQ,IAAK,mBACd,GAGF,KAAK,GAAI,OAAO,WAhTlB,IAAc,EACT,EAgTG,KAAK,MACT,QAAQ,IAAK,8BAlTH,EAmTL,KAAK,KAlTT,EAAM,uDAAyD,EAAO,OAG1E,EAAM,KAAM,YACZ,EAAM,KAAM,GACZ,EAAM,KAAM,cACZ,EAAM,KAAM,0BA6ST,QAAQ,IAAK,4BAEd,KAAK,oBAAqB,EAC3B,GACD,IAOD,OAAO,QAAU,CAEjB,CApVD","file":"/npm/generator-doc-metrix-node@0.3.2/app/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/generator-doc-metrix-node@0.3.2/app/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\n\n(function() {\n\t'use strict';\n\n\t// MODULES //\n\n\tvar path = require( 'path' ),\n\t\tyeoman = require( 'yeoman-generator' ),\n\t\tyosay = require( 'yosay' ),\n\t\tshell = require( 'shelljs' ),\n\t\tnpmName = require( 'npm-name' ),\n\t\tchalk = require( 'chalk' );\n\n\n\t// FUNCTIONS //\n\n\t/**\n\t* FUNCTION: git( name )\n\t*\tInitializes and runs git.\n\t*/\n\tfunction git( name ) {\n\t\tvar cmd = 'git remote add origin https://github.com/doc-metrix/' + name + '.git';\n\n\t\t// Initialize the repository:\n\t\tshell.exec( 'git init' );\n\t\tshell.exec( cmd );\n\t\tshell.exec( 'git add -A' );\n\t\tshell.exec( 'git commit -m \"[INIT]\"' );\n\t} // end FUNCTION git()\n\n\n\t// GENERATOR //\n\n\tvar Generator = yeoman.generators.Base.extend({\n\n\t\t/**\n\t\t* METHOD: init()\n\t\t*\tGenerator initialization.\n\t\t*/\n\t\tinit: function() {\n\t\t\tvar flg = this.options[ 'skip-message' ];\n\n\t\t\tthis.pkg = require( '../package.json' );\n\t\t\tthis.year = (new Date() ).getFullYear();\n\n\t\t\tif ( typeof flg === 'undefined' || !flg ) {\n\t\t\t\tthis.log( yosay( 'Welcome to the doc-metrix generator for associated Node.js utility libraries...' ) );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t* METHOD: promptUser()\n\t\t*\tPrompts a user for input relevant to the doc-metrix utility module.\n\t\t*/\n\t\tpromptUser: function() {\n\t\t\tvar next = this.async(),\n\t\t\t\tregex = /^doc\\-metrix\\-/,\n\t\t\t\tflg,\n\t\t\t\tdirname,\n\t\t\t\tprompts,\n\t\t\t\tgit,\n\t\t\t\tuser,\n\t\t\t\temail;\n\n\t\t\t// Output flag:\n\t\t\tflg = this.options[ 'skip-message' ];\n\n\t\t\t// Initialize defaults:\n\t\t\tuser = '';\n\t\t\temail = '';\n\n\t\t\t// Check if the user has Git:\n\t\t\tgit = shell.which( 'git' );\n\n\t\t\tif ( git ) {\n\t\t\t\tuser = shell.exec( 'git config --get user.name', { silent: true } ).output.trim();\n\t\t\t\temail = shell.exec( 'git config --get user.email', { silent: true } ).output.trim();\n\t\t\t}\n\n\t\t\t// Get the current directory name:\n\t\t\tdirname = path.basename( process.cwd() );\n\n\t\t\t// Inform the user as to naming conventions:\n\t\t\tif ( typeof flg === 'undefined' || !flg ) {\n\t\t\t\tthis.log( yosay( 'The module name should follow the convention `doc-metrix-{name}`, where `name` is a unique ID not already in use on NPM or within the doc-metrix organization on Github.' ) );\n\t\t\t}\n\n\t\t\t// Specify the input prompts required in order to tailor the module...\n\t\t\tprompts = [\n\t\t\t\t{\n\t\t\t\t\t'type': 'input',\n\t\t\t\t\t'name': 'name',\n\t\t\t\t\t'message': 'What is the module name?',\n\t\t\t\t\t'default': dirname,\n\t\t\t\t\tvalidate: function ( answer ) {\n\t\t\t\t\t\tvar next = this.async();\n\n\t\t\t\t\t\tif ( !regex.test( answer ) ) {\n\t\t\t\t\t\t\tnext( 'The provided name is not prefixed with `doc-metrix-`.' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnpmName( answer, function onResponse( error, available ) {\n\t\t\t\t\t\t\tif ( error ) {\n\t\t\t\t\t\t\t\tnext( 'Unable to check availability on NPM: ' + error );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( !available ) {\n\t\t\t\t\t\t\t\t// Ask for another name:\n\t\t\t\t\t\t\t\tnext( 'The requested module name already exists on NPM.' );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnext( true );\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'type': 'confirm',\n\t\t\t\t\t'name': 'git',\n\t\t\t\t\t'message': 'Create a new git repository?',\n\t\t\t\t\t'default': true,\n\t\t\t\t\tvalidate: function( answer ) {\n\t\t\t\t\t\tif ( answer && !git ) {\n\t\t\t\t\t\t\treturn 'Unable to find git. Ensure that you have git installed.';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\twhen: function( answers ) {\n\t\t\t\t\t\tif ( answers.git ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t\t'type': 'input',\n\t\t\t\t\t'name': 'repo',\n\t\t\t\t\t'message': 'Git repository name?',\n\t\t\t\t\tdefault: function( answers ) {\n\t\t\t\t\t\tvar name = answers.name.replace( 'doc-metrix-', '' );\n\t\t\t\t\t\treturn name + '-node';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'type': 'input',\n\t\t\t\t\t'name': 'author',\n\t\t\t\t\t'message': 'Primary author\\'s name?'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'type': 'input',\n\t\t\t\t\t'name': 'email',\n\t\t\t\t\t'message': 'Primary author\\'s contact e-mail?',\n\t\t\t\t\tdefault: function( answers ) {\n\t\t\t\t\t\treturn ( answers.git ) ? email : '';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'type': 'input',\n\t\t\t\t\t'name': 'license_holder',\n\t\t\t\t\t'message': 'Author name(s) to include in the license file?',\n\t\t\t\t\tdefault: function( answers ) {\n\t\t\t\t\t\treturn answers.author;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'type': 'input',\n\t\t\t\t\t'name': 'description',\n\t\t\t\t\t'message': 'Module description:',\n\t\t\t\t\t'default': 'Utility library.'\n\t\t\t\t}\n\t\t\t];\n\n\t\t\t// Prompt the user for responses:\n\t\t\tthis.prompt( prompts, function onAnswers( answers ) {\n\t\t\t\tthis.author = answers.author;\n\t\t\t\tthis.email = answers.email;\n\t\t\t\tthis.license_holder = answers.license_holder;\n\t\t\t\tthis.moduleName = answers.name;\n\t\t\t\tthis.repo = answers.repo;\n\t\t\t\tthis.description = answers.description;\n\t\t\t\tthis.git = answers.git;\n\n\t\t\t\tnext();\n\t\t\t}.bind( this ) );\n\t\t}, // end METHOD promptUser()\n\n\t\t/**\n\t\t* METHOD: mkdirs()\n\t\t*\tCreates module directories.\n\t\t*/\n\t\tmkdirs: function() {\n\t\t\tthis.mkdir( 'examples' );\n\t\t\tthis.mkdir( 'lib' );\n\t\t\tthis.mkdir( 'test' );\n\t\t}, // end METHOD mkdirs()\n\n\t\t/**\n\t\t* METHOD: dotFiles()\n\t\t*\tCopies over base dot files.\n\t\t*/\n\t\tdotFiles: function() {\n\t\t\tthis.copy( 'gitignore', '.gitignore' );\n\t\t\tthis.copy( 'npmignore', '.npmignore' );\n\t\t\tthis.copy( 'travis.yml', '.travis.yml' );\n\t\t}, // end METHOD dotfiles()\n\n\t\t/**\n\t\t* METHOD: makefile()\n\t\t*\tCopies over base Makefile.\n\t\t*/\n\t\tmakefile: function() {\n\t\t\tthis.copy( '_Makefile', 'Makefile' );\n\t\t}, // end METHOD makefile()\n\n\t\t/**\n\t\t* METHOD: license()\n\t\t*\tCreates a license file.\n\t\t*/\n\t\tlicense: function() {\n\t\t\tvar context = {\n\t\t\t\t\t'holder': this.license_holder,\n\t\t\t\t\t'year': this.year\n\t\t\t\t};\n\n\t\t\tthis.template( '_LICENSE', 'LICENSE', context );\n\t\t}, // end METHOD license()\n\n\t\t/**\n\t\t* METHOD: package()\n\t\t*\tCreates a `package.json` file.\n\t\t*/\n\t\tpackage: function() {\n\t\t\tvar context = {\n\t\t\t\t\t'name': this.moduleName,\n\t\t\t\t\t'repo': this.repo,\n\t\t\t\t\t'author': this.author,\n\t\t\t\t\t'email': this.email,\n\t\t\t\t\t'description': this.description\n\t\t\t\t};\n\n\t\t\tthis.template( '_package.json', 'package.json', context );\n\t\t}, // end METHOD package()\n\n\t\t/**\n\t\t* METHOD: todo()\n\t\t*\tCopies over a TODO file.\n\t\t*/\n\t\ttodo: function() {\n\t\t\tthis.copy( '_TODO.md', 'TODO.md' );\n\t\t}, // end METHOD todo()\n\n\t\t/**\n\t\t* METHOD: readme()\n\t\t*\tCreates a boilerplate README.\n\t\t*/\n\t\treadme: function() {\n\t\t\tvar context = {\n\t\t\t\t\t'name': this.moduleName,\n\t\t\t\t\t'repo': this.repo,\n\t\t\t\t\t'author': this.author,\n\t\t\t\t\t'year': this.year,\n\t\t\t\t\t'description': this.description\n\t\t\t\t};\n\n\t\t\tthis.template( '_README.md', 'README.md', context );\n\t\t}, // end METHOD readme()\n\n\t\t/**\n\t\t* METHOD: scripts()\n\t\t*\tCopies over module scripts.\n\t\t*/\n\t\tscripts: function() {\n\t\t\tthis.copy( 'scripts/_specs.js', 'scripts/specs.js' );\n\t\t}, // end METHOD scripts()\n\n\t\t/**\n\t\t* METHOD: lib()\n\t\t*\tCreates a module boilerplate.\n\t\t*/\n\t\tlib: function() {\n\t\t\tvar context = {\n\t\t\t\t\t'name': this.moduleName.split('-').slice(2).join('-'),\n\t\t\t\t\t'author': this.author,\n\t\t\t\t\t'email': this.email,\n\t\t\t\t\t'description': this.description,\n\t\t\t\t\t'year': this.year\n\t\t\t\t};\n\n\t\t\tthis.template( 'lib/_index.js', 'lib/index.js', context );\n\t\t}, // end METHOD lib()\n\n\t\t/**\n\t\t* METHOD: test()\n\t\t*\tCreates a test boilerplate.\n\t\t*/\n\t\ttest: function() {\n\t\t\tvar context = {\n\t\t\t\t\t'name': this.moduleName\n\t\t\t\t};\n\n\t\t\tthis.template( 'test/_test.js', 'test/test.js', context );\n\t\t}, // end METHOD test()\n\n\t\t/**\n\t\t* METHOD: examples()\n\t\t*\tCopies a boilerplate example.\n\t\t*/\n\t\texamples: function() {\n\t\t\tthis.copy( 'examples/_index.js', 'examples/index.js' );\n\t\t}, // end METHOD examples()\n\n\t\t/**\n\t\t* METHOD: install()\n\t\t*\tInitializes git and installs dependencies.\n\t\t*/\n\t\tinstall: function() {\n\t\t\tvar config = {\n\t\t\t\t\t'bower': false,\n\t\t\t\t\t'npm': true,\n\t\t\t\t\t'skipInstall': this.options[ 'skip-install' ],\n\t\t\t\t\t'skipMessage': false,\n\t\t\t\t\t'callback': function onFinish() {\n\t\t\t\t\t\tconsole.log( '\\n...finished.\\n' );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\tthis.on( 'end', function onEnd() {\n\t\t\t\tif ( this.git ) {\n\t\t\t\t\tconsole.log( '\\n...initializing git...\\n' );\n\t\t\t\t\tgit( this.repo );\n\t\t\t\t\tconsole.log( '\\n...initialized git.\\n' );\n\t\t\t\t}\n\t\t\t\tthis.installDependencies( config );\n\t\t\t});\n\t\t} // end METHOD install()\n\n\t});\n\n\n\t// EXPORTS //\n\n\tmodule.exports = Generator;\n\n})();\n"]}