UNPKG

@arcgis/create

Version:

ArcGIS command line tool to create new web GIS projects and applications

20 lines (16 loc) 721 B
#!/usr/bin/env node const majorNodeVersion = Number.parseInt(process.version.toString().replace("v", "").split(".")[0]); if (majorNodeVersion < 18) { console.error("You need to use Node.js version 18 or higher to run this program."); process.exit(1); } /** * the first argument is the path to the node executable * the second argument is the path to the script file * the third argument is the first argument to the script, which we hardcode to "init" if the user is running `create-arcgis` * this makes it so that `npm init @arcgis` will work with no arguments from the user */ if (process.argv.some((arg) => arg.includes("create"))) { process.argv.splice(2, 0, "init"); } await import("../dist/init.js");