create-arkos 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const child_process_1 = require("child_process");
|
|
|
20
20
|
const project_config_inquirer_1 = __importDefault(require("./utils/project-config-inquirer"));
|
|
21
21
|
const template_compiler_1 = __importDefault(require("./utils/template-compiler"));
|
|
22
22
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
23
|
+
const shared_1 = require("@arkos/shared");
|
|
23
24
|
handlebars_1.default.registerHelper("eq", (a, b) => a === b);
|
|
24
25
|
handlebars_1.default.registerHelper("neq", (a, b) => a !== b);
|
|
25
26
|
function main() {
|
|
@@ -31,9 +32,10 @@ function main() {
|
|
|
31
32
|
const templatesDir = path_1.default.join(__dirname, `../templates/basic`);
|
|
32
33
|
yield template_compiler_1.default.compile(templatesDir, config);
|
|
33
34
|
process.chdir(projectPath);
|
|
35
|
+
const packageManager = (0, shared_1.detectPackageManagerFromUserAgent)();
|
|
34
36
|
console.info("\nInstalling dependencies...");
|
|
35
|
-
console.info(
|
|
36
|
-
(0, child_process_1.execSync)(
|
|
37
|
+
console.info(`\nUsing ${packageManager}.\n`);
|
|
38
|
+
(0, child_process_1.execSync)(`${packageManager} install`, { stdio: "inherit" });
|
|
37
39
|
console.info(`
|
|
38
40
|
${chalk_1.default.bold(chalk_1.default.cyan("Arkos.js"))} project created successfully!
|
|
39
41
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,4CAAoB;AACpB,gDAAwB;AACxB,kDAA0B;AAC1B,iDAAyC;AACzC,8FAAoE;AACpE,kFAAyD;AACzD,4DAAoC;
|
|
1
|
+
{"version":3,"file":"index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E,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAE5D,OAAO,CAAC,IAAI,CAAC;IACX,eAAK,CAAC,IAAI,CAAC,eAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;;;UAG5B,MAAM,CAAC,WAAW;kBACV,eAAK,CAAC,IAAI,CAAC,cAAc,CAAC;;;;KAIvC,CAAC,CAAC;IACP,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport fs from \"fs\";\nimport path from \"path\";\nimport chalk from \"chalk\";\nimport { execSync } from \"child_process\";\nimport projectConfigInquirer from \"./utils/project-config-inquirer\";\nimport templateCompiler from \"./utils/template-compiler\";\nimport Handlebars from \"handlebars\";\nimport { detectPackageManagerFromUserAgent } from \"@arkos/shared\";\n\nHandlebars.registerHelper(\"eq\", (a, b) => a === b);\nHandlebars.registerHelper(\"neq\", (a, b) => a !== b);\n\nasync function main() {\n const config = await projectConfigInquirer.run();\n\n const projectPath = config.projectPath;\n\n fs.mkdirSync(projectPath, { recursive: true });\n\n console.info(\n `\\nCreating a new ${chalk.bold(chalk.cyan(\"Arkos.js\"))} project in ${chalk.green(`./${config.projectName}`)}`\n );\n\n const templatesDir = path.join(__dirname, `../templates/basic`);\n await templateCompiler.compile(templatesDir, config);\n\n process.chdir(projectPath);\n\n const packageManager = detectPackageManagerFromUserAgent();\n\n console.info(\"\\nInstalling dependencies...\");\n console.info(`\\nUsing ${packageManager}.\\n`);\n\n execSync(`${packageManager} install`, { stdio: \"inherit\" });\n\n console.info(`\n ${chalk.bold(chalk.cyan(\"Arkos.js\"))} project created successfully!\n\n Next steps:\n 1. cd ${config.projectName}\n 2. setup your ${chalk.cyan(\"DATABASE_URL\")} under .env\n 3. npx prisma db push\n 4. npx prisma generate\n 5. npm run dev\n `);\n}\n\nmain().catch(console.error);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-arkos",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "CLI for creating Arkos.js projects, see docs at www.arkosjs.com/docs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-arkos": "./dist/index.js"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"build": "tsc",
|
|
10
10
|
"dev": "ts-node src/index.ts",
|
|
11
11
|
"test:hbs": "ts-node src/utils/helpers/hbs-tester.helpers.ts",
|
|
12
|
+
"prebuild": "npm run build -w @arkos/shared && npm run build -w arkos",
|
|
12
13
|
"prepublishOnly": "pnpm run build"
|
|
13
14
|
},
|
|
14
15
|
"author": "Uanela Como",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"@clack/prompts": "^0.11.0",
|
|
33
34
|
"@inquirer/prompts": "^7.6.0",
|
|
34
35
|
"inquirer": "^8.2.6",
|
|
36
|
+
"@arkos/shared": "workspace:*",
|
|
35
37
|
"chalk": "^5.4.1",
|
|
36
38
|
"handlebars": "^4.7.8"
|
|
37
39
|
}
|