UNPKG

webext-manifest-browser-polyfill

Version:
30 lines (25 loc) 775 B
#!/usr/bin/env node import generate from './index.js'; const argList = process.argv.join('=').split('='); let inputPath = 'manifest.json'; let outputPath; let targetVersion; let backgroundStrategy; let stores; argList.forEach((item, index) => { const nextValue = argList[index + 1]; if (item === '--input' || item === '-i') { inputPath = nextValue; } else if (item === '--output' || item === '-o') { outputPath = nextValue; } else if (item === '--target-version' || item === '-mv') { targetVersion = nextValue | 0; } else if (item === '--background-strategy') { backgroundStrategy = nextValue; } else if (item === '--stores') { stores = nextValue; } }); generate({ inputPath, outputPath, targetVersion, backgroundStrategy, stores, });