Removed unnecessary files from boiler plate
This commit is contained in:
parent
780793e5be
commit
960923de40
13 changed files with 2 additions and 108 deletions
|
|
@ -1,19 +0,0 @@
|
||||||
import React, { Component } from 'react';
|
|
||||||
import icon from '../../assets/img/icon-128.png';
|
|
||||||
|
|
||||||
class GreetingComponent extends Component {
|
|
||||||
state = {
|
|
||||||
name: 'dev',
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<p>Hello, {this.state.name}!</p>
|
|
||||||
<img src={icon} alt="extension icon" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default GreetingComponent;
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Vytal",
|
"name": "Vytal",
|
||||||
"description": "Vytal",
|
"description": "Vytal",
|
||||||
"options_page": "options.html",
|
|
||||||
"permissions": ["storage", "debugger", "activeTab", "alarms"],
|
"permissions": ["storage", "debugger", "activeTab", "alarms"],
|
||||||
"background": { "service_worker": "background.bundle.js" },
|
"background": { "service_worker": "background.bundle.js" },
|
||||||
"action": {
|
"action": {
|
||||||
|
|
@ -12,16 +11,9 @@
|
||||||
"icons": {
|
"icons": {
|
||||||
"128": "icon-128.png"
|
"128": "icon-128.png"
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
|
||||||
{
|
|
||||||
"matches": ["http://*/*", "https://*/*", "<all_urls>"],
|
|
||||||
"js": ["contentScript.bundle.js"],
|
|
||||||
"css": ["content.styles.css"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
{
|
{
|
||||||
"resources": ["content.styles.css", "icon-128.png", "icon-32.png"],
|
"resources": ["icon-128.png", "icon-32.png"],
|
||||||
"matches": []
|
"matches": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
import { printLine } from './modules/print';
|
|
||||||
|
|
||||||
console.log('Content script works!');
|
|
||||||
console.log('Must reload extension for modifications to take effect.');
|
|
||||||
|
|
||||||
printLine("Using the 'printLine' function from the Print Module");
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
export const printLine = (line) => {
|
|
||||||
console.log('===> FROM THE PRINT MODULE:', line);
|
|
||||||
};
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<div id="app-container"></div>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
window.location.replace("https://google.com");
|
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
.OptionsContainer {
|
|
||||||
width: 100%;
|
|
||||||
height: 50vh;
|
|
||||||
font-size: 2rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import './Options.css';
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
title: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Options: React.FC<Props> = ({ title }: Props) => {
|
|
||||||
return <div className="OptionsContainer">{title} Page</div>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Options;
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<title>Settings</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="app-container"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { render } from 'react-dom';
|
|
||||||
|
|
||||||
import Options from './Options';
|
|
||||||
import './index.css';
|
|
||||||
|
|
||||||
render(
|
|
||||||
<Options title={'Settings'} />,
|
|
||||||
window.document.querySelector('#app-container')
|
|
||||||
);
|
|
||||||
|
|
||||||
if (module.hot) module.hot.accept();
|
|
||||||
|
|
@ -36,14 +36,11 @@ if (fileSystem.existsSync(secretsPath)) {
|
||||||
var options = {
|
var options = {
|
||||||
mode: process.env.NODE_ENV || 'development',
|
mode: process.env.NODE_ENV || 'development',
|
||||||
entry: {
|
entry: {
|
||||||
newtab: path.join(__dirname, 'src', 'pages', 'Newtab', 'index.jsx'),
|
|
||||||
options: path.join(__dirname, 'src', 'pages', 'Options', 'index.jsx'),
|
|
||||||
popup: path.join(__dirname, 'src', 'pages', 'Popup', 'index.jsx'),
|
popup: path.join(__dirname, 'src', 'pages', 'Popup', 'index.jsx'),
|
||||||
background: path.join(__dirname, 'src', 'pages', 'Background', 'index.js'),
|
background: path.join(__dirname, 'src', 'pages', 'Background', 'index.js'),
|
||||||
contentScript: path.join(__dirname, 'src', 'pages', 'Content', 'index.js'),
|
|
||||||
},
|
},
|
||||||
chromeExtensionBoilerplate: {
|
chromeExtensionBoilerplate: {
|
||||||
notHotReload: ['background', 'contentScript'],
|
notHotReload: ['background'],
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].bundle.js',
|
filename: '[name].bundle.js',
|
||||||
|
|
@ -131,15 +128,6 @@ var options = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin({
|
|
||||||
patterns: [
|
|
||||||
{
|
|
||||||
from: 'src/pages/Content/content.styles.css',
|
|
||||||
to: path.join(__dirname, 'build'),
|
|
||||||
force: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
new CopyWebpackPlugin({
|
new CopyWebpackPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{
|
{
|
||||||
|
|
@ -158,24 +146,12 @@ var options = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: path.join(__dirname, 'src', 'pages', 'Options', 'index.html'),
|
|
||||||
filename: 'options.html',
|
|
||||||
chunks: ['options'],
|
|
||||||
cache: false,
|
|
||||||
}),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: path.join(__dirname, 'src', 'pages', 'Popup', 'index.html'),
|
template: path.join(__dirname, 'src', 'pages', 'Popup', 'index.html'),
|
||||||
filename: 'popup.html',
|
filename: 'popup.html',
|
||||||
chunks: ['popup'],
|
chunks: ['popup'],
|
||||||
cache: false,
|
cache: false,
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: path.join(__dirname, 'src', 'pages', 'Newtab', 'index.html'),
|
|
||||||
filename: 'newtab.html',
|
|
||||||
chunks: ['newtab'],
|
|
||||||
cache: false,
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
infrastructureLogging: {
|
infrastructureLogging: {
|
||||||
level: 'info',
|
level: 'info',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue