Skip to content

Commit f20903e

Browse files
organised the code
1 parent 2400ba6 commit f20903e

File tree

9 files changed

+901
-31
lines changed

9 files changed

+901
-31
lines changed

iframe.html

Lines changed: 0 additions & 2 deletions
This file was deleted.

package-lock.json

Lines changed: 885 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
2-
"name": "puppeteer-in-extension",
3-
"version": "1.0.0",
2+
"name": "auto-browse-agent-extension",
3+
"version": "0.0.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"build": "rollup -c && cp manifest.json out/"
7+
"clean": "rm -rf dist",
8+
"build": "rollup -c && cp manifest.json dist/"
89
},
910
"keywords": [],
1011
"author": "",
1112
"license": "MIT",
1213
"devDependencies": {
1314
"@rollup/plugin-node-resolve": "^15.2.3",
1415
"rollup": "^4.22.4"
16+
},
17+
"dependencies": {
18+
"puppeteer-core": "^24.3.0"
1519
}
16-
}
20+
}

playground.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

manifest.json renamed to public/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "Puppeteer in extension",
3-
"version": "1.0",
2+
"name": "Auto Browse Agent",
3+
"version": "0.0.1",
44
"manifest_version": 3,
55
"background": {
66
"service_worker": "background.js",

rollup.config.mjs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
/**
2-
* @license
3-
* Copyright 2024 Google Inc.
4-
* SPDX-License-Identifier: Apache-2.0
5-
*/
61
import { nodeResolve } from "@rollup/plugin-node-resolve";
72
import { cpSync } from "fs";
83

94
export default {
10-
input: "background.js",
5+
input: "src/background/background.js",
116
output: {
127
format: "esm",
13-
dir: "out"
8+
dir: "dist"
149
},
1510
// If you do not need to use WebDriver BiDi protocol,
1611
// exclude chromium-bidi/lib/cjs/bidiMapper/BidiMapper.js to minimize the bundle size.
@@ -23,9 +18,9 @@ export default {
2318
{
2419
name: "copy-files",
2520
buildEnd() {
26-
cpSync("manifest.json", "out/manifest.json");
27-
cpSync("popup.html", "out/popup.html");
28-
cpSync("popup.js", "out/popup.js");
21+
cpSync("public/manifest.json", "dist/manifest.json");
22+
cpSync("src/popup/popup.html", "dist/popup.html");
23+
cpSync("src/popup/popup.js", "dist/popup.js");
2924
}
3025
}
3126
]

background.js renamed to src/background/background.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license
3-
* Copyright 2024 Google Inc.
4-
* SPDX-License-Identifier: Apache-2.0
5-
*/
61
import {
72
connect,
83
ExtensionTransport

popup.html renamed to src/popup/popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33

44
<head>
5-
<title>Puppeteer Extension</title>
5+
<title>Auto Browse Agent</title>
66
<style>
77
body {
88
width: 300px;
File renamed without changes.

0 commit comments

Comments
 (0)