-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sigoden
committed
Nov 13, 2021
1 parent
dc77bba
commit 1c9b8a2
Showing
23 changed files
with
1,687 additions
and
1,424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 80 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
process.env.NODE_ENV = 'development' | ||
process.env.NODE_ENV = "development"; | ||
|
||
module.exports = { | ||
parser: '@babel/eslint-parser', | ||
extends: [ | ||
'react-app', | ||
'standard', | ||
'standard-jsx', | ||
'standard-react', | ||
], | ||
parser: "@babel/eslint-parser", | ||
extends: ["react-app", "plugin:prettier/recommended"], | ||
plugins: ["react"], | ||
globals: { | ||
chrome: 'readonly', | ||
chrome: "readonly", | ||
globalThis: true, | ||
}, | ||
ignorePatterns: ['build', 'tmp'], | ||
ignorePatterns: ["build", "tmp"], | ||
rules: { | ||
'react/prop-types': 0, | ||
'comma-dangle': ['error', 'always-multiline'], | ||
"@typescript-eslint/no-explicit-any": 0, | ||
}, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// Do this as the first thing so that any code reading it knows the right env. | ||
process.env.NODE_ENV = 'production' | ||
process.env.ASSET_PATH = '/' | ||
process.env.NODE_ENV = "production"; | ||
process.env.ASSET_PATH = "/"; | ||
|
||
const shell = require('shelljs') | ||
const webpack = require('webpack') | ||
const config = require('../webpack.config') | ||
const shell = require("shelljs"); | ||
const webpack = require("webpack"); | ||
const config = require("../webpack.config"); | ||
|
||
config.mode = 'production' | ||
config.mode = "production"; | ||
|
||
shell.rm('-rf', 'build') | ||
shell.rm("-rf", "build"); | ||
webpack(config, function (err) { | ||
if (err) throw err | ||
}) | ||
if (err) throw err; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
// Do this as the first thing so that any code reading it knows the right env. | ||
process.env.NODE_ENV = 'development' | ||
process.env.ASSET_PATH = '/' | ||
process.env.NODE_ENV = "development"; | ||
process.env.ASSET_PATH = "/"; | ||
|
||
const WebpackDevServer = require('webpack-dev-server') | ||
const webpack = require('webpack') | ||
const config = require('../webpack.config') | ||
const path = require('path') | ||
const WebpackDevServer = require("webpack-dev-server"); | ||
const webpack = require("webpack"); | ||
const config = require("../webpack.config"); | ||
const path = require("path"); | ||
|
||
const PORT = process.env.PORT || 3000 | ||
const PORT = process.env.PORT || 3000; | ||
|
||
for (const entryName in config.entry) { | ||
if (['popup', 'background'].indexOf(entryName) > -1) { | ||
if (["popup", "background"].indexOf(entryName) > -1) { | ||
config.entry[entryName] = [ | ||
'webpack/hot/dev-server', | ||
"webpack/hot/dev-server", | ||
`webpack-dev-server/client?hot=true&hostname=localhost&port=${PORT}`, | ||
].concat(config.entry[entryName]) | ||
].concat(config.entry[entryName]); | ||
} | ||
} | ||
|
||
const compiler = webpack(config) | ||
const compiler = webpack(config); | ||
|
||
const server = new WebpackDevServer( | ||
{ | ||
https: false, | ||
client: false, | ||
host: 'localhost', | ||
host: "localhost", | ||
port: PORT, | ||
static: { | ||
directory: path.join(__dirname, '../build'), | ||
directory: path.join(__dirname, "../build"), | ||
}, | ||
devMiddleware: { | ||
publicPath: `http://localhost:${PORT}/`, | ||
writeToDisk: true, | ||
}, | ||
headers: { | ||
'Access-Control-Allow-Origin': '*', | ||
"Access-Control-Allow-Origin": "*", | ||
}, | ||
allowedHosts: 'all', | ||
allowedHosts: "all", | ||
}, | ||
compiler, | ||
) | ||
compiler | ||
); | ||
|
||
;(async () => { | ||
await server.start() | ||
})() | ||
(async () => { | ||
await server.start(); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { init } from './background/chrome' | ||
import { bootstrap } from './background/store' | ||
import { init } from "./background/chrome"; | ||
import { bootstrap } from "./background/store"; | ||
|
||
init() | ||
bootstrap() | ||
init(); | ||
bootstrap(); |
Oops, something went wrong.