generated from ecomplus/storefront-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ce3ff76
Showing
169 changed files
with
29,408 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Storefront | ||
|
||
:shopping: :rocket: | ||
[PWA](https://developers.google.com/web/progressive-web-apps) and | ||
[JAMstack](https://jamstack.org/) | ||
based e-commerce template for | ||
[E-Com Plus](https://www.e-com.plus) | ||
stores | ||
|
||
> Gerenated from [@ecomplus/storefront-starter](https://github.com/ecomplus/storefront-starter) | ||
:scroll: **[Get started](https://github.com/ecomplus/storefront-starter#getting-started)** | ||
/ [Documentation](https://developers.e-com.plus/storefront/) | ||
|
||
## Project setup | ||
|
||
``` | ||
npm i | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
|
||
``` | ||
npm run serve | ||
``` | ||
|
||
It starts serving site on http://localhost:9100/. | ||
|
||
### Compiles and minifies for production | ||
|
||
``` | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"assetsByChunkName": { | ||
"vendors~app-account~app-checkout~app-confirmation~app-order": "chunk.026fadaf0b7e19e77f75.js", | ||
"vendors~app-account~app-confirmation~app-order": "chunk.3c1f1e91dfe6e240f6a3.js", | ||
"vendors~app-account~app-checkout": "chunk.6ece6653ce34f1a9cbaf.js", | ||
"admin": [ | ||
"admin.458025569017be9eea2c.js", | ||
"admin.458025569017be9eea2c.js.map" | ||
], | ||
"app-account": "chunk.07802f52c2513b0b17e9.js", | ||
"app-confirmation": "chunk.78a18d22d50ddca19e5a.js", | ||
"app-order": "chunk.c4ced903a262dd3abe8e.js", | ||
"checkout": [ | ||
"checkout.57ac9104f5ea1b90f378.js", | ||
"checkout.57ac9104f5ea1b90f378.js.map" | ||
], | ||
"storefront": [ | ||
"storefront.57a66833174b454c42b4.css", | ||
"storefront.3b4b978323f7c0c2a4f8.js", | ||
"storefront.57a66833174b454c42b4.css.map", | ||
"storefront.3b4b978323f7c0c2a4f8.js.map" | ||
], | ||
"vendors~app-cart": "chunk.c5891bab5f187d60a825.js", | ||
"vendors~app-checkout": "chunk.b15c6e20d188cb68721c.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## Deploy Storefront to Firebase | ||
|
||
Pre-rendered views and assets to [Firebase Hosting](https://firebase.google.com/docs/hosting?hl=pt-br), non-pre-rendered views SSRed with [Cloud Functions](https://firebase.google.com/docs/functions) and cached (acting like ISG). | ||
|
||
### Getting started | ||
|
||
1. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform; | ||
2. Generate and download a JSON key for the created account; | ||
3. Add a _secret_ to your GitHub repository with name `GCP_ACCOUNT_KEY` and paste the key JSON; | ||
|
||
#### Prepare CI files | ||
|
||
4. Copy new build and deploy GitHub Actions workflow from `.github/workflows/.firebase/build-and-deploy.yml` to `.github/workflows/build-and-deploy.yml`; | ||
|
||
```bash | ||
mv ./.github/workflows/.firebase/build-and-deploy.yml ./.github/workflows/build-and-deploy.yml | ||
echo "true" > ./.github/firebase-deploy | ||
git add ./.github | ||
git commit -m "ci(build-and-deploy): deploy to firebase" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const functions = require('firebase-functions') | ||
|
||
const { ssr } = require('@ecomplus/storefront-renderer/functions/') | ||
|
||
process.env.STOREFRONT_LONG_CACHE = 'true' | ||
|
||
exports.ssr = functions.https.onRequest((req, res) => ssr(req, res)) |
Oops, something went wrong.