{"version":3,"sources":["jsdelivr-header.js","/npm/plop-pack-npm-install@0.3.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,MAAE,OAAU,QAAQ,iBAEpB,WAAc,GAAuB,KAAd,GAAG,IAEhC,SAAS,WAAW,EAAG,GACtB,MAAM,EAAe,EAAO,QAAU,CACrC,IAAK,EAAO,KACZ,OAAO,EACP,MAAO,WACJ,CACH,IAAK,EAAO,MAGb,OAAO,IAAI,SAAQ,CAAC,EAAS,KACf,MAAM,MAAO,CAAC,WAAY,GAElC,GAAG,SAAU,IACb,WAAW,GACd,EAAQ,6BAER,EAAO,2BAA2B,IACnC,GACC,GAEJ,CAEA,OAAO,QAAU,SAAU,GAC1B,EAAK,kBAAkB,CAAE,aAAa,IACtC,EAAK,cAAc,aAAc,WAClC","file":"/npm/plop-pack-npm-install@0.3.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/plop-pack-npm-install@0.3.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","const { spawn } = require('child_process');\n\nconst didSucceed = (code) => `${code}` === '0';\n\nfunction npmInstall(_, config) {\n\tconst spawnOptions = config.verbose ? {\n\t\tcwd: config.path,\n\t\tshell: true,\n\t\tstdio: 'inherit',\n\t} : {\n\t\tcwd: config.path\n\t};\n\n\treturn new Promise((resolve, reject) => {\n\t\tconst npmI = spawn('npm', ['install'], spawnOptions);\n\n\t\tnpmI.on('close', (code) => {\n\t\t\tif (didSucceed(code)) {\n\t\t\t\tresolve(`npm install ran correctly`);\n\t\t\t} else {\n\t\t\t\treject(`npm install exited with ${code}`);\n\t\t\t}\n\t\t});\n\t});\n}\n\nmodule.exports = function (plop) {\n\tplop.setDefaultInclude({ actionTypes: true });\n\tplop.setActionType('npmInstall', npmInstall);\n};\n"]}