Skip to content

A React app that shows multiple products for the user to choose and stores them in a shopping cart. It builds different apps, depending of the flag used on the build script.

Notifications You must be signed in to change notification settings

gabrielnvg/pokemon-stores

Repository files navigation

Description

A React app that shows multiple products for the user to choose and stores them in a shopping cart. It builds different apps, depending of the flag used on the build script.

Demo


Dependencies


This project was bootstrapped with Create React App and ejected.

Available Scripts

In the project directory, you can run:

npm start

The npm start script is set to run the npm start:grass script.

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm start:<store-name>

The same as npm start, but runs the chosen store.

No matter which store you choose to run with npm run start:<store-name>, the changes made will affects all the stores.
The differences between the stores, are the variables displayed on the page, such as the page title, the theme color and the products.

npm run build:<store-name>

Builds the chosen store for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run deploy:<store-name>

Runs the npm run build:<store-name> (using the same <store-name>) and deploys the build folder using Surge.

npm run deploy:all

Runs all the npm run deploy:<store-name>.
All scripts it runs, are manually added on it.

npm run test

Launches the test runner in the interactive watch mode.


Adding a new store

To add a new store, the following needs to be added:

  • The new store JSON file.
  • The respective lines in package.json (the build script, the deploy script and add the new deploy script to the npm run deploy:all).
  • The logos, favicon and the manifest.json in the respective store public folder.

Observations

  • Since no product stock quantity information comes from the JSON, each product stock value is inifnite in the app.

About

A React app that shows multiple products for the user to choose and stores them in a shopping cart. It builds different apps, depending of the flag used on the build script.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages