Skip to content

Commit

Permalink
fix: update logic for in app browser
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Feb 15, 2024
1 parent 9cf8788 commit be0fb3c
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 191 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,63 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [ 'main' ]
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
packages: write
contents: read
pages: write
id-token: write
packages: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node v16 & GitHub registry
uses: actions/setup-node@v3
with:
node-version: 18
- name: Use Node v16 & GitHub registry
uses: actions/setup-node@v3
with:
node-version: 18

- name: Build React App
run: |
yarn install:all
yarn build
- name: Build React App
run: |
yarn install:all
yarn build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Setup Pages
uses: actions/configure-pages@v2

- name: Copy Builds
run: |
mkdir build
cp -r examples/sample-vue-app/dist build/vue
cp -r examples/sample-react-app/dist build/react
cp -r examples/sample-vanilla-app/dist build/vanilla
cp -r examples/sample-angular-app/dist/easy-angular build/angular
- name: Copy Builds
run: |
mkdir build
cp -r examples/sample-vue-app/dist build/vue
cp -r examples/sample-react-app/dist build/react
cp -r examples/sample-vanilla-app/dist build/vanilla
cp -r examples/sample-angular-app/dist/easy-angular build/angular
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload build
path: './build'
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload build
path: './build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
50 changes: 25 additions & 25 deletions .github/workflows/lint-build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Lint, Build & Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.head_ref || github.ref_name }}-build-test-scan
cancel-in-progress: true
group: ${{ github.head_ref || github.ref_name }}-build-test-scan
cancel-in-progress: true

jobs:
build-and-test:
runs-on: ubuntu-latest
name: Lint, Build & Test
build-and-test:
runs-on: ubuntu-latest
name: Lint, Build & Test

steps:
- name: Checkout
uses: actions/checkout@v3
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: "yarn"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: Install
run: yarn install:all
- name: Install
run: yarn install:all

- name: Lint
run: yarn run lint
- name: Lint
run: yarn run lint

- name: Test
run: yarn run test
- name: Test
run: yarn run test

- name: Build
run: yarn run build
- name: Build
run: yarn run build
79 changes: 39 additions & 40 deletions .github/workflows/publish-dapp-kit.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
name: Publish GitHub NPM Packages

on:
push:
tags:
- '*'
push:
tags:
- '*'

permissions:
contents: read
packages: write
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: yarn install:all
- run: yarn build
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: yarn install:all
- run: yarn build

- name: Publish DApp-Kit
run: |
cd packages/dapp-kit
yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish DApp-Kit
run: |
cd packages/dapp-kit
yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish DApp-Kit-UI
run: |
cd packages/dapp-kit-ui
yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish DApp-Kit-React
run: |
cd packages/dapp-kit-react
yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish DApp-Kit-UI
run: |
cd packages/dapp-kit-ui
yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish DApp-Kit-React
run: |
cd packages/dapp-kit-react
yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
32 changes: 16 additions & 16 deletions examples/sample-react-app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
},
}
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
};
2 changes: 1 addition & 1 deletion examples/sample-svelte-app/src/app.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Svelte</title>
Expand Down
32 changes: 18 additions & 14 deletions examples/sample-vue-app/public/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't
work properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Loading

0 comments on commit be0fb3c

Please sign in to comment.