@adonisjs-ecommerce-core/create 1.0.2 → 2.1.0

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -4
  2. package/package.json +6 -3
package/dist/index.js CHANGED
@@ -9,8 +9,9 @@ import fs from "fs-extra";
9
9
  import path from "path";
10
10
  import { execSync } from "child_process";
11
11
  import validatePackageName from "validate-npm-package-name";
12
- var TEMPLATE_REPO = "github:haliltoma/adonisjs-ecommerce-core/templates/default#main";
13
- var VERSION = "1.0.1";
12
+ var TEMPLATE_REPO = "github:haliltoma/adonisjs-ecommerce-core#main";
13
+ var TEMPLATE_PATH = "templates/default";
14
+ var VERSION = "2.1.0";
14
15
  function printBanner() {
15
16
  const lines = [
16
17
  "",
@@ -48,7 +49,7 @@ function printBanner() {
48
49
  console.log(
49
50
  chalk.hex("#7C4DFF").bold(" AdonisJS E-Commerce") + chalk.gray(" | ") + chalk.hex("#B388FF")(`v${VERSION}`)
50
51
  );
51
- console.log(chalk.gray(" Modern e-commerce platform powered by AdonisJS 6 + React"));
52
+ console.log(chalk.gray(" Modern e-commerce platform powered by AdonisJS 7 + React"));
52
53
  console.log();
53
54
  console.log(chalk.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
54
55
  console.log();
@@ -153,12 +154,17 @@ async function createProject(config) {
153
154
  interval: 100
154
155
  };
155
156
  const degit = (await import("degit")).default;
157
+ const tempDir = path.join(process.cwd(), ".temp-template");
158
+ await fs.remove(tempDir);
156
159
  const emitter = degit(TEMPLATE_REPO, {
157
160
  cache: false,
158
161
  force: true,
159
162
  verbose: false
160
163
  });
161
- await emitter.clone(targetDir);
164
+ await emitter.clone(tempDir);
165
+ const templateSource = path.join(tempDir, TEMPLATE_PATH);
166
+ await fs.copy(templateSource, targetDir);
167
+ await fs.remove(tempDir);
162
168
  spinner.text = chalk.hex("#B388FF")("Configuring project...");
163
169
  spinner.spinner = {
164
170
  frames: ["[ ]", "[= ]", "[== ]", "[=== ]", "[ ===]", "[ ==]", "[ =]", "[ ]"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs-ecommerce-core/create",
3
- "version": "1.0.2",
4
- "description": "Create a new AdonisJS E-Commerce application",
3
+ "version": "2.1.0",
4
+ "description": "Create a new AdonisCommerce e-commerce application (AdonisJS 7 + React) with SOLID principles",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -22,7 +22,10 @@
22
22
  "scaffold",
23
23
  "react",
24
24
  "inertia",
25
- "typescript"
25
+ "typescript",
26
+ "solid",
27
+ "solid-principles",
28
+ "architecture"
26
29
  ],
27
30
  "author": "",
28
31
  "license": "MIT",