|
1 |
| -# packages/create-catalyst |
| 1 | +# create-catalyst |
2 | 2 |
|
3 |
| -> [!WARNING] |
4 |
| -> The create-catalyst package is in development and not published to the NPM registry |
| 3 | +Create a new Catalyst project, optionally connect the project to a BigCommerce store. Also supports "switching" the store that Catalyst is connected to by running `init`. |
5 | 4 |
|
6 |
| -Scaffolding for Catalyst storefront projects. |
7 |
| - |
8 |
| -## Usage |
9 |
| - |
10 |
| -**NPM:** |
11 |
| - |
12 |
| -```sh |
13 |
| -npm create @bigcommerce/catalyst@latest my-catalyst-store |
14 |
| -``` |
15 |
| - |
16 |
| -**PNPM:** |
| 5 | +## NPM |
17 | 6 |
|
18 | 7 | ```sh
|
19 |
| -pnpm create @bigcommerce/catalyst@latest my-catalyst-store |
| 8 | +npm create catalyst-storefront@latest --storeHash your_store_hash --accessToken your_access_token |
20 | 9 | ```
|
21 | 10 |
|
22 |
| -**Yarn:** |
| 11 | +## PNPM |
23 | 12 |
|
24 | 13 | ```sh
|
25 |
| -yarn create @bigcommerce/catalyst@latest my-catalyst-store |
| 14 | +pnpm create catalyst-storefront@latest --storeHash your_store_hash --accessToken your_access_token |
26 | 15 | ```
|
27 | 16 |
|
28 |
| -## Contributing |
29 |
| - |
30 |
| -**Prerequisites:** |
31 |
| - |
32 |
| -- Node `>=18.16` |
33 |
| -- [Verdaccio](https://verdaccio.org/) `>=5` |
34 |
| - |
35 |
| -**Developing Locally:** |
36 |
| - |
37 |
| -While developing `create-catalyst` locally, it's essential to test your changes before publishing them to NPM. To achieve this, we utilize Verdaccio, a lightweight private npm proxy registry that you can run in your local environment. By publishing `create-catalyst` to Verdaccio during local development, we can point `[yarn|npm|pnpm] create @bigcommerce/catalyst` at the Verdaccio registry URL and observe how our changes will behave once they are published to NPM. |
38 |
| - |
39 |
| -1. Install Verdaccio: https://verdaccio.org/docs/installation |
40 |
| -2. Run Verdaccio: `verdaccio --listen 4873` |
41 |
| -3. Add an NPM user with `@bigcommerce` scope to Verdaccio: `npm adduser --scope=@bigcommerce --registry=http://localhost:4873` |
42 |
| - |
43 |
| -> ⚠️ **IMPORTANT:** NPM registry data is immutable, meaning once published, a package cannot change. Be careful to ensure that you do not run commands such as `publish` against the default NPM registry if your work is not ready to be published. Always explicitly pass `--registry=http://localhost:<VERDACCIO_PORT>` with commands that modify the registry (such as `publish`) to ensure you only publish to Verdaccio when working locally. |
44 |
| -
|
45 |
| -4. If necessary, run `pnpm build` and `pnpm publish --registry=http://localhost:4873` in each Catalyst-scoped package required by relevant examples listed in `apps/` (e.g., Catalyst `core` examples require `@bigcommerce/components`, `@bigcommerce/eslint-config-catalyst`, `@bigcommerce/catalyst-client`) |
46 |
| -5. Run `pnpm build` and `pnpm publish --registry=http://localhost:4873` in the `@bigcommerce/create-catalyst` package |
47 |
| -6. Confirm published packages are listed in Verdaccio: http://localhost:4873 |
48 |
| - |
49 |
| -In order to point `npm create`, `pnpm create`, and/or `yarn create` to the Verdaccio registry, run one or more of the following commands against the package manager's global configuration: |
50 |
| - |
51 |
| -- **NPM:** `npm config set @bigcommerce:registry http://localhost:4873` |
52 |
| -- **PNPM:** `pnpm config set @bigcommerce:registry http://localhost:4873` |
53 |
| -- **Yarn:** `yarn config set npmScopes.bigcommerce.npmRegistryServer "http://localhost:4873" -H` and then `yarn config set unsafeHttpWhitelist "localhost" -H` |
| 17 | +# To Do |
54 | 18 |
|
55 |
| -7. Finally, navigate to the directory in which you'd like to create a new Catalyst storefront, and run `[yarn|npm|pnpm] create @bigcommerce/catalyst name-of-your-catalyst-storefront` |
| 19 | +- [ ] Channel Site Routes |
| 20 | +- [ ] Check Active Storeront Limit |
| 21 | +- [ ] Prompt Sample Data API for New Channels |
| 22 | +- [ ] Yarn module resolution bug |
| 23 | +- [ ] Write root `.vscode/settings.json` |
0 commit comments