generated from ecomplus/application-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 fbfb2c4
Showing
56 changed files
with
18,807 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,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,6 @@ | ||
blank_issues_enabled: true | ||
|
||
contact_links: | ||
- name: E-Com Plus Community | ||
url: https://community.e-com.plus/ | ||
about: If you have an E-Com Plus store, please ask and answer questions here. |
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 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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 @@ | ||
1 |
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,5 @@ | ||
{ | ||
"extends": [ | ||
"github>ecomclub/renovate-config:app" | ||
] | ||
} |
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,25 @@ | ||
name: Create GitHub release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Release tag | ||
id: release_tag | ||
uses: Akryum/release-tag@8eeb62bcf949a368763f4057c34e7eb834467122 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
preset: angular |
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,133 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'functions/**' | ||
- 'scripts/_constants.js' | ||
- 'scripts/firebase-deploy.js' | ||
- '*.json' | ||
- '.github/deploy' | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to Firebase | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.head_commit.message != 'Initial commit' && | ||
!contains(github.event.head_commit.message, '[skip ci]') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install root dependencies | ||
run: npm ci --only=production --ignore-scripts | ||
|
||
- name: Install functions dependencies | ||
run: cd functions && npm ci --only=production --no-optional && cd .. | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run deploy | ||
env: | ||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | ||
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
SERVER_OPERATOR_TOKEN: ${{ secrets.SERVER_OPERATOR_TOKEN }} | ||
run: npm run deploy | ||
|
||
update-app-json: | ||
name: Update application and publish | ||
runs-on: ubuntu-latest | ||
needs: deploy | ||
if: github.repository != 'ecomplus/application-starter' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Write README with base URI | ||
env: | ||
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
run: | | ||
echo "App base URI: https://us-central1-$FIREBASE_PROJECT_ID.cloudfunctions.net/app/" \ | ||
> ./assets/README | ||
- name: Run Wget and write to JSON file | ||
env: | ||
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
run: | | ||
sleep 20 | ||
wget -O ./assets/application.json \ | ||
https://us-central1-$FIREBASE_PROJECT_ID.cloudfunctions.net/app/ | ||
- name: Config Git and check diff | ||
run: | | ||
git config --local user.email '[email protected]' | ||
git config --local user.name 'GitHub Action' | ||
git add ./assets/ | ||
(git diff-index --quiet HEAD && echo "::set-output name=diff::0") || echo "::set-output name=diff::1" | ||
id: git_diff | ||
|
||
- name: Commit local file changes | ||
if: steps.git_diff.outputs.diff == 1 | ||
run: | | ||
git commit -m 'chore(assets): update application body [skip ci]' | ||
- name: Push changes | ||
if: steps.git_diff.outputs.diff == 1 | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master | ||
|
||
- name: Check stable package version | ||
env: | ||
APP_CHANGED: ${{ steps.git_diff.outputs.diff }} | ||
run: | | ||
CAN_PUBLISH=$(node -p "!(/-/.test(require('./package.json').version)) && process.env.APP_CHANGED") | ||
echo "::set-output name=publish::$CAN_PUBLISH" | ||
id: pkg_version | ||
|
||
- name: Setup Node | ||
if: steps.pkg_version.outputs.publish == 1 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Cache dependencies | ||
if: steps.pkg_version.outputs.publish == 1 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install root dependencies | ||
if: steps.pkg_version.outputs.publish == 1 | ||
run: npm ci --only=production --ignore-scripts | ||
|
||
- name: Run publish script | ||
if: steps.pkg_version.outputs.publish == 1 | ||
env: | ||
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
MARKET_TOKEN: ${{ secrets.MARKET_TOKEN }} | ||
run: "npm run publish:market" | ||
continue-on-error: true |
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,31 @@ | ||
name: Init repository | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
init-repository: | ||
name: Prepare repo after generation | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.head_commit.message, 'Initial commit') | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Remove LICENSE and generate app ID | ||
run: | | ||
git config --local user.email '[email protected]' | ||
git config --local user.name 'GitHub Action' | ||
rm ./LICENSE | ||
rm ./.github/workflows/init-repository.yml | ||
sed -i "s/9000/$(( 100000 + RANDOM % 800000 ))/g" ./functions/ecom.config.js | ||
git commit -am "chore(init): remove default license and generate \`app_id\` [skip ci]" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master |
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,47 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'assets/application.json' | ||
- 'ecomplus-market.json' | ||
- 'hosting/description.md' | ||
- 'hosting/icon.png' | ||
- 'scripts/_constants.js' | ||
- 'scripts/market-publication.js' | ||
- '.github/workflows/publish.yml' | ||
|
||
jobs: | ||
pulish: | ||
name: Publish app to E-Com Plus Market | ||
runs-on: ubuntu-latest | ||
if: github.repository != 'ecomplus/application-starter' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install root dependencies | ||
run: npm ci --only=production --ignore-scripts | ||
|
||
- name: Run publish script | ||
env: | ||
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | ||
MARKET_TOKEN: ${{ secrets.MARKET_TOKEN }} | ||
run: "npm run publish:market" |
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,64 @@ | ||
dist/ | ||
.runtimeconfig.json | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next |
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,5 @@ | ||
FROM gitpod/workspace-full:latest | ||
|
||
RUN bash -c ". .nvm/nvm.sh && nvm install 18 && nvm use 18 && nvm alias default 18" | ||
|
||
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix |
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,9 @@ | ||
image: | ||
file: .gitpod.Dockerfile | ||
tasks: | ||
- init: npm i | ||
vscode: | ||
extensions: | ||
- standard.vscode-standard | ||
- atishay-jain.all-autocomplete | ||
- xabikos.javascriptsnippets |
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 @@ | ||
_ |
Oops, something went wrong.