2022-12-05 19:34:15 +00:00
|
|
|
#!/usr/bin/env node
|
2022-12-06 20:03:34 +00:00
|
|
|
const packageJson = require("./package.json");
|
|
|
|
const semver = require("semver");
|
2022-12-05 19:34:15 +00:00
|
|
|
|
2022-12-06 20:03:34 +00:00
|
|
|
const currentNodeVersion = process.versions.node;
|
|
|
|
const supportedNodeVersion = packageJson.engines.node;
|
|
|
|
|
|
|
|
if (!semver.satisfies(currentNodeVersion, supportedNodeVersion)) {
|
|
|
|
console.error(
|
|
|
|
`You are running Node ${currentNodeVersion}.\n` +
|
|
|
|
`@waku/create-app works only with ${packageJson.engines.node}.\n` +
|
|
|
|
`Please update your version of Node.`
|
|
|
|
);
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
const { init } = require("./createApp");
|
|
|
|
|
2022-12-21 22:30:02 +00:00
|
|
|
init(packageJson.name, packageJson.description, packageJson.version);
|