Skip to content

Commit

Permalink
Merge pull request #55 from near-everything/new-gateway
Browse files Browse the repository at this point in the history
Vite gateway
  • Loading branch information
elliotBraem authored Apr 22, 2024
2 parents aebe4dd + f6ee05e commit 557fd93
Show file tree
Hide file tree
Showing 24 changed files with 2,533 additions and 10,657 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Code Quality Check

on:
pull_request:
push:
branches:
- main

jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: "yarn"

- name: Install dependencies
run: yarn install

- name: Run code formatting check
run: yarn run fmt:check
18 changes: 18 additions & 0 deletions .github/workflows/release-mainnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy Components to Mainnet

on:
push:
branches: [main]

jobs:
deploy-mainnet:
uses: nearbuilders/bos-workspace/.github/workflows/deploy.yml@main
with:
deploy-env: "mainnet"
bw-legacy: false
app-name: "every.near"
deploy-account-address: ${{ vars.BOS_SIGNER_ACCOUNT_ID }}
signer-account-address: ${{ vars.BOS_SIGNER_ACCOUNT_ID }}
signer-public-key: ${{ vars.BOS_SIGNER_PUBLIC_KEY }}
secrets:
SIGNER_PRIVATE_KEY: ${{ secrets.BOS_SIGNER_PRIVATE_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/release-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy Components to Testnet

on:
push:
branches: [develop]

jobs:
deploy-staging:
uses: nearbuilders/bos-workspace/.github/workflows/deploy.yml@main
with:
build-env: "testnet"
deploy-env: "testnet"
bw-legacy: false
app-name: "builddao"
deploy-account-address: builddao.testnet
signer-account-address: builddao.testnet
signer-public-key: ed25519:6ycWXZES2zEGPurZqP35AUQx92aAzuS7r9ea1GcSQQiT
secrets:
SIGNER_PRIVATE_KEY: ${{ secrets.BOS_TESTNET_SIGNER_PRIVATE_KEY }}
32 changes: 27 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
node_modules
.vscode
.DS_Store
.nx

# Legacy
/_legacy

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Build
node_modules
/build
/dist
.bos
dist-ssr
*.local

/_legacy
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.nx
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
_legacy/
build/
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# everything.dev

<img src="./assets/under-construction-bar-roll.gif" alt="under construction" >

## Getting started

1. Install packages

```cmd
yarn install
```

2. Start dev environment

```cmd
yarn run dev
```
1 change: 1 addition & 0 deletions apps/every.near/widget/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const Root = styled.div`

return (
<Root>
<p>YOU DID IT</p>
<Widget src="every.near/widget/app.view" props={{ config, ...props }} />
</Root>
);
20 changes: 0 additions & 20 deletions apps/every.near/widget/page/fun.jsx

This file was deleted.

27 changes: 26 additions & 1 deletion apps/every.near/widget/page/home.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
const fadeIn = styled.keyframes`
from {
opacity: 0;
}
to {
opacity: 1;
}
`;

const CSS = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
animation: ${fadeIn} 1s ease-out;
h1 {
font-size: 3rem;
text-shadow: rgba(0, 0, 0, 0.1) 1px 1px 1px, rgba(0, 0, 0, 0.1) 3px 3px 3px;
}
img {
max-width: 100%;
height: auto;
}
@media (max-width: 768px) {
h1 {
font-size: 3rem;
}
}
`;

return (
Expand All @@ -13,6 +39,5 @@ return (
src="https://ipfs.near.social/ipfs/bafkreidhy7zo33wqjxhqsv2dd6dp2wzloitaa4lmj3rzq5zvcdtp2smeaa"
alt="under construction"
/>

</CSS>
);
2 changes: 1 addition & 1 deletion bos.workspace.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"apps": ["./apps/*"]
}
}
1 change: 0 additions & 1 deletion gateway
Submodule gateway deleted from 87cf80
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>viewer</title>
<script
defer
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/runtime.11b6858f93d8625836ab.bundle.js"
></script>
<script
defer
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/main.a1928743fda434c0eaa2.bundle.js"
></script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
26 changes: 17 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@
"name": "viewer",
"version": "1.0.0",
"description": "",
"private": true,
"type": "module",
"scripts": {
"fmt": "prettier --write '**/*.{js,jsx,ts,tsx,json}'",
"fmt:check": "prettier --check '**/*.{js,jsx,ts,tsx,json}'",
"bw": "bos-workspace",
"dev": "pnpm run dev:gateway && pnpm run dev:apps",
"dev:gateway": "cd gateway && pnpm run build",
"dev:apps": "pnpm run bw ws dev -g ./gateway/dist"
"dev": "yarn run dev:gateway && yarn run dev:apps",
"dev:apps": "yarn run bw ws dev",
"dev:gateway": "vite",
"build:gateway": "vite build",
"preview:gateway": "vite preview"
},
"keywords": [],
"dependencies": {
"preact": "^10.19.6"
},
"devDependencies": {
"bos-workspace": "1.0.0-alpha",
"@preact/preset-vite": "^2.8.2",
"bos-workspace": "^1.0.0-alpha",
"concurrently": "^8.2.2",
"prettier": "^2.8.8"
"prettier": "^2.8.8",
"vite": "^5.2.0"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "prettier --write --ignore-unknown"
},
"workspaces": [
"gateway"
]
}
}
Loading

0 comments on commit 557fd93

Please sign in to comment.