Skip to content

Commit

Permalink
feat: add vite build (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Jan 10, 2024
1 parent 6dd606a commit 828628a
Show file tree
Hide file tree
Showing 28 changed files with 14,081 additions and 66,384 deletions.
4 changes: 4 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VITE_APP_WEBSITE_VERSION="0.1.0"
VITE_APP_EXPLORER_VERSION="1.0.158859-20240110140315.commit-19935b0"
VITE_PUBLIC_URL=""
VITE_APP_EXPLORER_BASE_URL="/cdn/packages/explorer/1.0.158859-20240110140315.commit-19935b0/"
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EXPLORER_PATH points to the browser-interface/static folder in your local filesystem

EXPLORER_PATH="../unity-renderer/browser-interface/static"
FAST_REFRESH=false

20 changes: 7 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
CI: false
steps:
- uses: actions/checkout@master
- name: Use Node.js 14.x
uses: actions/setup-node@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v4.0.1
with:
node-version: 14.x
cache: npm
node-version: 18.x
cache: 'npm'

- name: set package.json version
uses: menduz/oddish-action@master
Expand All @@ -36,18 +36,13 @@ jobs:

- name: build
run: npm run build
env:
CI: false

- name: test
run: npm run test

- name: publish npm package
uses: menduz/oddish-action@master
with:
registry-url: "https://registry.npmjs.org"
access: public
cwd: ./build
cwd: ./dist
## use action runId instead of current date to generate snapshot numbers
deterministic-snapshot: true
## inform gitlab after publishing to proceed with CDN propagation
Expand All @@ -66,7 +61,7 @@ jobs:
run: |
npx @dcl/cdn-uploader@next \
--bucket $EXPLORER_WEB_BUCKET \
--local-folder build \
--local-folder dist \
--bucket-folder "${{ steps.install.outputs.public_path }}"
build-static:
Expand All @@ -91,13 +86,12 @@ jobs:
- name: build for deployment
run: npm run build:full
env:
CI: false
GEN_STATIC_LOCAL: true

- uses: actions/upload-artifact@v2
with:
name: static-site-build
path: build
path: dist
if-no-files-found: error

notify_deployment:
Expand Down
8 changes: 0 additions & 8 deletions .storybook/main.js

This file was deleted.

8 changes: 0 additions & 8 deletions .storybook/preview.js

This file was deleted.

23 changes: 0 additions & 23 deletions config-overrides.js

This file was deleted.

9 changes: 5 additions & 4 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimal-ui" />
<link rel="shortcut icon" type="image/x-icon" href="https://decentraland.org/images/icons/favicon-32x32.png" />
<link rel="preload" href="%PUBLIC_URL%/images/[email protected]" as="image" />
<link rel="preload" href="%VITE_PUBLIC_URL%/images/[email protected]" as="image" />
<link rel="preconnect" href="https://cdn.decentraland.org" />
<link rel="preconnect" href="https://api.thegraph.com" />
<title>Decentraland</title>
Expand All @@ -17,7 +17,7 @@
property="og:description"
content="Decentraland is a virtual social platform built and governed by its users. Every day, users enter the world to meet up, play games, attend live events, trade in the marketplace, engage with brands, visit galleries and much more"
/>
<meta property="og:image" content="%PUBLIC_URL%/images/[email protected]" />
<meta property="og:image" content="%VITE_PUBLIC_URL%/images/[email protected]" />
<style type="text/css">
html,
body {
Expand Down Expand Up @@ -111,7 +111,7 @@
background-position: bottom center;
background-repeat: no-repeat;
background-color: #230b61;
background-image: url('%PUBLIC_URL%/images/[email protected]');
background-image: url('%VITE_PUBLIC_URL%/images/[email protected]');
position: absolute;
top: 0;
left: 0;
Expand All @@ -136,7 +136,7 @@
}
</style>
<script>
window.REACT_APP_WEBSITE_VERSION = '%REACT_APP_WEBSITE_VERSION%'
window.VITE_APP_WEBSITE_VERSION = '%VITE_APP_WEBSITE_VERSION%'
</script>
</head>
<body class="dcl-loading">
Expand Down Expand Up @@ -196,5 +196,6 @@
data-cf-beacon='{"token": "529363954dff44d8b036b8fb8879bcc5"}'
></script>
<!-- End Cloudflare Web Analytics -->
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit 828628a

Please sign in to comment.