Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

refactor: clean house #50

Merged
merged 5 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
10 changes: 6 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"jsxSingleQuote": true,
"singleQuote": true,
"trailingComma": "es5",
"requirePragma": false,
"arrowParens": "always"
}
"trailingComma": "all",
"printWidth": 120,
"proseWrap": "never",
"endOfLine": "lf"
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
"scripts": {
"build": "node utils/build.js",
"start": "node utils/server.js",
"prettier": "prettier --write '**/*.{js,jsx,ts,tsx,json,css,scss,md}'"
"prettier": "prettier --write '**/*.{js,jsx,ts,tsx,json,css,scss}'"
},
"dependencies": {
"@hot-loader/react-dom": "^17.0.2",
"echarts": "^5.3.2",
"react": "^17.0.2",
"react-data-grid": "^7.0.0-beta.13",
"react-dom": "^17.0.2",
Expand Down
4 changes: 1 addition & 3 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"manifest_version": 3,
"name": "OpenSumi DevTools",
"options_page": "options.html",
"background": { "service_worker": "background.bundle.js" },
"action": {
"default_popup": "popup.html",
"default_icon": "logo.png"
},
"icons": {
"128": "logo.png"
},
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*", "<all_urls>"],
"matches": ["<all_urls>"],
"js": ["contentScript.bundle.js"],
"css": ["content.styles.css"]
}
Expand Down
1 change: 0 additions & 1 deletion src/pages/Background/index.js
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
console.log('This is the background page.');
1 change: 0 additions & 1 deletion src/pages/ContentScripts/index.js
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
console.log('Content script works!');
21 changes: 7 additions & 14 deletions src/pages/Devtools/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
const run = () => {
window.chrome.devtools.inspectedWindow.eval(
`window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__`,
(result, exception) => {
if (exception) {
console.log(exception);
} else {
if (result) {
chrome.devtools.panels.create(
'OpenSumi DevTools',
'logo.png',
'panel.html'
);
}
window.chrome.devtools.inspectedWindow.eval(`window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__`, (result, exception) => {
if (exception) {
console.log(exception);
} else {
if (result) {
chrome.devtools.panels.create('OpenSumi DevTools', 'logo.png', 'panel.html');
}
}
);
});
};

run();
8 changes: 0 additions & 8 deletions src/pages/Options/Options.css

This file was deleted.

12 changes: 0 additions & 12 deletions src/pages/Options/Options.tsx

This file was deleted.

Empty file removed src/pages/Options/index.css
Empty file.
11 changes: 0 additions & 11 deletions src/pages/Options/index.html

This file was deleted.

12 changes: 0 additions & 12 deletions src/pages/Options/index.jsx

This file was deleted.

45 changes: 0 additions & 45 deletions src/pages/Popup/Popup.css

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/Popup/Popup.jsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/pages/Popup/index.css

This file was deleted.

11 changes: 0 additions & 11 deletions src/pages/Popup/index.html

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/Popup/index.jsx

This file was deleted.

Loading