{"version":3,"sources":["jsdelivr-header.js","/npm/generate-angular2-component-readme@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACJA,IAAI,GAAS,QAAQ,MACjB,OAAS,QAAQ,UACjB,MAAS,QAAQ,UA6CrB,SAAS,YAAY,GACjB,IAAI,EAAmB,WAAW,GAClC,GAAG,UAAU,QAAQ,MAAQ,aAAc,GAAkB,SAAS,EAAK,GACvE,QAAQ,IAAI,uBAAuB,MAAQ,QAAQ,MAAQ,cAAgB,iBAAiB,MAChG,GACJ,CAEA,SAAS,WAAW,GAChB,IAAI,EAAU,GAId,OAHA,EAAa,MAAM,MAAM,KAAK,SAAQ,SAAS,GAC3C,GAAW,KAAO,EAAY,IAClC,IACO,KAAO,EAAa,UAApB,yFAG8C,EAAa,OAH3D,uBAKA,EAAa,YALb,qBAOA,EAAU,IACrB,CA9DI,QAAQ,IAAI,qFAAqF,OAEjG,OAAO,QACP,OAAO,IAAI,CACP,CACI,KAAK,SACL,UAAU,EACV,QAAS,6BAA6B,MAE1C,CACI,KAAM,YACN,UAAU,EACV,QAAS,OAAO,MAAQ,oBAAoB,MAEhD,CACI,KAAM,cACN,QAAS,cAAc,MAAQ,oBAAoB,MAEvD,CACI,KAAM,QACN,UAAS,EACT,QAAU,cAAc,MAAQ,8DAA8D,MAElG,CACI,KAAM,QACN,QAAU,aAAa,SAExB,SAAS,EAAK,GACb,QAAQ,IAAI,6BAA6B,OACzC,QAAQ,IAAI,gBAAgB,MAAQ,EAAO,QAC3C,QAAQ,IAAI,4BAA4B,MAAQ,EAAO,QACvD,QAAQ,IAAI,kBAAkB,MAAQ,EAAO,QAC7C,QAAQ,IAAI,iBAAiB,MAAO,EAAO,OAE3C,YAAY,EACpB","file":"/npm/generate-angular2-component-readme@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/generate-angular2-component-readme@1.0.0/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","#!/usr/bin/env node\n\nvar fs     = require('fs'),\n    prompt = require('prompt'),\n    color  = require('colors');\n\n(function generateReadmeForAngular2Component() {\n    console.log(\"\\n Generate Readme.md for component in Angular2 project, please fill informations.\".green);\n\n    prompt.start();\n    prompt.get([\n        {\n            name:'author',\n            required: true,\n            message: \"Author(s) of the component\".blue\n        },\n        {\n            name: 'component',\n            required: true,\n            message: \"Name\".green + \" of the component\".blue\n        },\n        {\n            name: 'description',\n            message: \"Description\".green + \" of the component\".blue\n        },\n        {\n            name: 'props',\n            required:true,\n            message:  \"Properties,\".green + \" separated with space ex: textToto:string numberToto:number\".blue\n        },\n        {\n            name: 'image',\n            message:  \"Image link\".green\n        }\n        ], function(err, result) {\n            console.log(\"\\n Informations provided: \".green);\n            console.log(\"\\n Author(s) \".green + result.author);\n            console.log(\"\\n Name of the component \".green + result.author);\n            console.log(\"\\n Description \".green + result.author);\n            console.log(\"\\n Attributes \".green, result.props);\n\n            writeReadme(result);\n    });\n})();\n\n/**\n * \n * @param {*} informations \n */\nfunction writeReadme(informations) {\n    var constructContent = getContent(informations);\n    fs.writeFile(process.cwd() + \"/README.md\", constructContent, function(err, result) {\n        console.log('\\n File written in: '.white + process.cwd() + \"/README.md \" + \" successfully.\".green);\n    });\n}\n\nfunction getContent(informations) {\n    var attribs = \"\";\n    informations.props.split(\" \").forEach(function(attribute){\n        attribs += \"- \" + attribute + \"\\n\";\n    });\n    return \"# \" + informations.component + \" component for Angular2. \\n\"\n        +  \"*** \\n\"\n        +  \"## Author \\n\"\n        +  \" Here are the creators of the component: \" + informations.author + \"\\n\"\n        +  \"## Description \\n \"\n        +  informations.description + \"\\n\"\n        +  \"## Properties \\n\"\n        +  attribs + \"\\n\";\n}\n"]}