@bagisto-headless/create 1.0.6 → 1.0.7
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/README.md +45 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Bagisto Headless Commerce Project Creator
|
|
2
|
+
|
|
3
|
+
`@bagisto-headless/create` is a CLI tool to quickly bootstrap a new Bagisto Headless Commerce project.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
You can create a new project by running:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @bagisto-headless/create <your-project-name>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
This command simplifies the setup process by performing the following steps:
|
|
16
|
+
|
|
17
|
+
1. **Clones the Repository**: It fetches the latest version of the [Bagisto Headless Commerce](https://github.com/bagisto/nextjs-commerce).
|
|
18
|
+
2. **Sets up the Project**: Creates a new directory with your project name and initializes it.
|
|
19
|
+
3. **Installs Dependencies**: Automatically runs `npm install` with the necessary flags.
|
|
20
|
+
4. **Configures Environment**: Prompts you for essential configuration details:
|
|
21
|
+
* `NEXT_PUBLIC_BAGISTO_ENDPOINT`: Your Bagisto Shop URL.
|
|
22
|
+
* `NEXT_PUBLIC_BAGISTO_STOREFRONT_KEY`: Your Bagisto Storefront Key.
|
|
23
|
+
* `NEXT_PUBLIC_NEXT_AUTH_URL`: Your Headless Shop URL.
|
|
24
|
+
* `NEXT_PUBLIC_NEXT_AUTH_SECRET`: Your Headless Shop Secret.
|
|
25
|
+
* `COMPANY_NAME`: Your company name.
|
|
26
|
+
5. **Generates `.env.local`**: Saves your configuration to a `.env.local` file so you're ready to start developing immediately.
|
|
27
|
+
|
|
28
|
+
## After Installation
|
|
29
|
+
|
|
30
|
+
Once the setup is complete, you can start your development server:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd <your-project-name>
|
|
34
|
+
npm run dev
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
* **Bagisto Headless eCommerce**: [https://bagisto.com/en/headless-ecommerce/](https://bagisto.com/en/headless-ecommerce/)
|
|
40
|
+
* **Headless Documentation**: [https://headless-doc.bagisto.com/](https://headless-doc.bagisto.com/)
|
|
41
|
+
* **API Documentation**: [https://api-docs.bagisto.com/](https://api-docs.bagisto.com/)
|
|
42
|
+
* **GitHub Repository**: [https://github.com/bagisto/nextjs-commerce](https://github.com/bagisto/nextjs-commerce)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
Developed by [Bagisto](https://bagisto.com/).
|
package/index.js
CHANGED
|
@@ -104,7 +104,7 @@ async function promptEnvVariables(projectName) {
|
|
|
104
104
|
output: process.stdout,
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
const questions = [
|
|
108
108
|
{ key: "NEXT_PUBLIC_BAGISTO_ENDPOINT", message: "Enter Your Bagisto Shop URL:" },
|
|
109
109
|
{ key: "NEXT_PUBLIC_BAGISTO_STOREFRONT_KEY", message: "Enter Your Bagisto Storefront Key:" },
|
|
110
110
|
{ key: "NEXT_PUBLIC_NEXT_AUTH_URL", message: "Enter Your Headless Shop URL:" },
|