@dcl-regenesislabs/bevy-explorer-web 0.1.0-18232959052.commit-663740b → 0.1.0-18281041624.commit-c57665d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -2
- package/pkg/webgpu_build_bg.wasm +0 -0
- package/scripts/prebuild.js +49 -0
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl-regenesislabs/bevy-explorer-web",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-18281041624.commit-c57665d",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"postinstall": "node ./scripts/prebuild.js"
|
|
6
|
+
},
|
|
4
7
|
"repository": {
|
|
5
8
|
"type": "git",
|
|
6
9
|
"url": "git+https://github.com/decentraland/bevy-explorer.git"
|
|
7
10
|
},
|
|
8
|
-
"
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"dotenv": "^17.2.3"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "",
|
|
15
|
+
"commit": "c57665d757589683ca3ceb576a5e56141700c2ca"
|
|
9
16
|
}
|
package/pkg/webgpu_build_bg.wasm
CHANGED
|
Binary file
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const dotenv = require("dotenv");
|
|
3
|
+
|
|
4
|
+
let ENV_CONTENT = {};
|
|
5
|
+
|
|
6
|
+
if (fs.existsSync(".env")) {
|
|
7
|
+
Object.assign(ENV_CONTENT, dotenv.parse(fs.readFileSync(".env")));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const packageJson = JSON.parse(fs.readFileSync("./package.json").toString());
|
|
11
|
+
|
|
12
|
+
ENV_CONTENT["REACT_APP_WEBSITE_VERSION"] = packageJson.version;
|
|
13
|
+
|
|
14
|
+
Object.assign(ENV_CONTENT, getPublicUrls());
|
|
15
|
+
|
|
16
|
+
packageJson.homepage = ENV_CONTENT["PUBLIC_URL"];
|
|
17
|
+
|
|
18
|
+
if (packageJson.homepage) {
|
|
19
|
+
// github action outputs. Do not touch.
|
|
20
|
+
console.log("::set-output name=public_url::" + packageJson.homepage);
|
|
21
|
+
console.log(
|
|
22
|
+
"::set-output name=public_path::" + new URL(packageJson.homepage).pathname
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
console.log("VERSIONS: ", Object.entries(ENV_CONTENT), "\n");
|
|
27
|
+
|
|
28
|
+
fs.writeFileSync(
|
|
29
|
+
".env",
|
|
30
|
+
Object.entries(ENV_CONTENT)
|
|
31
|
+
.map((e) => e[0] + "=" + JSON.stringify(e[1]))
|
|
32
|
+
.join("\n") + "\n"
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
fs.writeFileSync("./package.json", JSON.stringify(packageJson, null, 2));
|
|
36
|
+
|
|
37
|
+
function getPublicUrls() {
|
|
38
|
+
if (!process.env.GEN_STATIC_LOCAL) {
|
|
39
|
+
if (process.env.CI) {
|
|
40
|
+
return {
|
|
41
|
+
PUBLIC_URL: `https://cdn.decentraland.org/${packageJson.name}/${packageJson.version}`,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
PUBLIC_URL: ``,
|
|
48
|
+
};
|
|
49
|
+
}
|