Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ecomplus-bot committed Sep 29, 2022
0 parents commit ce3ff76
Show file tree
Hide file tree
Showing 169 changed files with 29,408 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .README.md
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
```
26 changes: 26 additions & 0 deletions .bundles.json
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"
}
}
20 changes: 20 additions & 0 deletions .functions/README.md
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"
```
7 changes: 7 additions & 0 deletions .functions/index.js
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))
Loading

0 comments on commit ce3ff76

Please sign in to comment.