Skip to content

Commit

Permalink
Merge pull request #68 from Vigilance-DAO/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VenkatTeja authored Aug 29, 2023
2 parents 9321772 + 9d29d92 commit 8b17d6c
Show file tree
Hide file tree
Showing 49 changed files with 3,069 additions and 1,247 deletions.
7 changes: 6 additions & 1 deletion chrome-extension/bundle-config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const prebuildOptions = {
}) || ""
)
.replace("\\", "/");
console.log(prebuildOutputScript);
console.log("Transpiled prebuild script", prebuildOutputScript);

if (prebuildOutputScript == "./") {
throw new Error("Prebuild script is not found");
Expand All @@ -164,6 +164,11 @@ const prebuildOptions = {
console.error(err);
}
console.log("Generating prebuilt html done");

// remove prebuild script
await rm(prebuildOutputScript).then(() => {
console.log("Removed", prebuildOutputScript);
}).catch(console.error);
});

build.onDispose(async () => {
Expand Down
22 changes: 20 additions & 2 deletions chrome-extension/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,24 @@ const abi = [

const address = "0x68Db62ADCaADdb21cB000841f1F347A6d8bEED9b"

// for production
// const API_ENDPOINT = "https://api.vigilancedao.org"
// const DOMAIN = 'https://vigilancedao.org'

// for staging
const API_ENDPOINT = 'https://i4jz77p469.execute-api.ap-northeast-1.amazonaws.com/staging';
const DOMAIN = 'https://vigilancedao.org'

// for development
// const API_ENDPOINT = "http://localhost:4000";
// const DOMAIN = "http://localhost:3000";

const USER_ID_KEY = "user-id";

module.exports = {
abi, address
}
abi,
address,
API_ENDPOINT,
DOMAIN,
USER_ID_KEY,
};
9 changes: 5 additions & 4 deletions chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"dev:other": "node bundle-config.mjs --watch",
"build": "concurrently npm:build:content npm:build:other npm:build:inject",
"dev": "concurrently npm:dev:other npm:dev:content npm:dev:inject",
"build:content": "browserify src/content.js -o build/content.js",
"dev:content": "nodemon --exec \"browserify src/content.js -o build/content.js\" --watch src/content.js",
"build:inject": "browserify src/inject.js -o build/inject.js",
"dev:inject": "nodemon --exec \"browserify src/inject.js -o build/inject.js\" --watch src/inject.js",
"build:content": "browserify -p esmify src/content.js -o build/content.js",
"dev:content": "nodemon --exec \"browserify -p esmify src/content.js -o build/content.js\" --watch src/content.js",
"build:inject": "browserify -p esmify src/inject.js -o build/inject.js",
"dev:inject": "nodemon --exec \"browserify -p esmify src/inject.js -o build/inject.js\" --watch src/inject.js",
"copy:assets": "cp -r assets/ build/static/",
"release": "yarn build && yarn build:content && yarn build:inject && yarn copy:assets"
},
Expand Down Expand Up @@ -58,6 +58,7 @@
"@types/mixpanel-browser": "^2.47.0",
"concurrently": "^8.2.0",
"esbuild-envfile-plugin": "^1.0.5",
"esmify": "^2.1.1",
"mkdirp": "^3.0.0",
"nodemon": "^2.0.22"
}
Expand Down
2 changes: 1 addition & 1 deletion chrome-extension/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Web3 Vigilance - Browser security",
"description": "Protect yourself from new websites against potential scams, frauds & phishing sites. Maintained by a blockchain org 'Vigilance DAO'",
"version": "0.3.0",
"version": "0.3.1",
"icons": {
"16": "images/icon16.png",
"32": "images/icon32.png",
Expand Down
Loading

0 comments on commit 8b17d6c

Please sign in to comment.