Skip to content

Commit 2416139

Browse files
author
Nick Lockhart
committed
Replace build tooling with parcel
1 parent d474b54 commit 2416139

File tree

6 files changed

+5140
-2875
lines changed

6 files changed

+5140
-2875
lines changed

.babelrc

+8-24
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
{
2-
"presets": [
3-
[
4-
"@babel/preset-env",
5-
{
6-
"corejs": "3.0.0",
7-
"useBuiltIns": "entry"
8-
}
9-
]
10-
],
11-
"plugins": [
12-
[
13-
"@babel/plugin-transform-react-jsx",
14-
{
15-
"useBuiltIns": true
16-
}
17-
],
18-
"@babel/plugin-syntax-object-rest-spread",
19-
[
20-
"@babel/plugin-transform-runtime",
21-
{
22-
"regenerator": true
23-
}
24-
]
25-
]
2+
"plugins": [
3+
[
4+
"@babel/plugin-transform-react-jsx",
5+
{
6+
"useBuiltIns": true
7+
}
8+
]
9+
]
2610
}

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.yml]
11+
indent_style = space
12+
indent_size = 2

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ dist/
22
node_modules/
33
.cache/
44
yarn-error.log
5+
.DS_Store
6+
.parcel-cache

.parcelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@parcel/config-webextension"
3+
}

package.json

+55-26
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,35 @@
44
"description": "",
55
"private": true,
66
"scripts": {
7-
"lint": "./node_modules/.bin/eslint --fix --ignore-path .gitignore .",
8-
"build": "webpack"
7+
"build": "parcel build src/manifest.json --no-content-hash --no-source-maps --dist-dir distribution --no-cache --detailed-report 0",
8+
"lint": "run-p lint:*",
9+
"lint-fix": "run-p 'lint:* -- --fix'",
10+
"lint:css": "stylelint src/**/*.css",
11+
"lint:js": "xo",
12+
"test": "run-p lint:* build",
13+
"watch": "parcel watch src/manifest.json --target webext-dev --dist-dir distribution"
14+
},
15+
"browserslist": [
16+
"last 1 Chrome version",
17+
"last 1 Firefox version"
18+
],
19+
"xo": {
20+
"envs": [
21+
"browser"
22+
],
23+
"rules": {
24+
"no-unused-vars": [
25+
"error",
26+
{
27+
"varsIgnorePattern": "browser"
28+
}
29+
]
30+
}
31+
},
32+
"stylelint": {
33+
"extends": "stylelint-config-xo"
934
},
10-
"author": "",
11-
"license": "ISC",
1235
"dependencies": {
13-
"@babel/core": "^7.7.0",
14-
"@babel/runtime": "^7.1.2",
1536
"@giphy/js-fetch-api": "^1.7.0",
1637
"debounce-fn": "^1.0.0",
1738
"delegate": "^3.2.0",
@@ -22,28 +43,36 @@
2243
"select-dom": "^4.1.3",
2344
"text-field-edit": "^3.0.1",
2445
"webext-domain-permission-toggle": "^1.0.1",
25-
"webext-dynamic-content-scripts": "^6.0.4"
46+
"webext-dynamic-content-scripts": "^6.0.4",
47+
"webextension-polyfill": "^0.7.0"
2648
},
2749
"devDependencies": {
28-
"@babel/plugin-proposal-unicode-property-regex": "^7.0.0",
29-
"@babel/plugin-syntax-object-rest-spread": "^7.0.0",
3050
"@babel/plugin-transform-react-jsx": "^7.0.0",
31-
"@babel/plugin-transform-runtime": "^7.1.0",
32-
"@babel/preset-env": "^7.7.1",
33-
"@babel/preset-react": "^7.7.0",
34-
"@babel/register": "^7.7.0",
35-
"babel-loader": "^8.0.6",
36-
"copy-webpack-plugin": "^5.1.1",
37-
"css-loader": "^3.2.0",
38-
"cssnano": "^4.1.7",
39-
"eslint": "^6.6.0",
40-
"eslint-config-standard": "^14.1.0",
41-
"eslint-plugin-import": "^2.18.2",
42-
"eslint-plugin-node": "^10.0.0",
43-
"eslint-plugin-promise": "^4.2.1",
44-
"eslint-plugin-standard": "^4.0.1",
45-
"mini-css-extract-plugin": "^0.8.0",
46-
"webpack": "^4.41.2",
47-
"webpack-cli": "^3.3.10"
51+
"@parcel/config-webextension": "^2.0.0-nightly.2220",
52+
"@parcel/optimizer-cssnano": "^2.0.0-nightly.599",
53+
"@parcel/optimizer-htmlnano": "^2.0.0-nightly.599",
54+
"@parcel/packager-css": "^2.0.0-nightly.599",
55+
"@parcel/packager-html": "^2.0.0-nightly.599",
56+
"@parcel/transformer-css": "^2.0.0-nightly.599",
57+
"@parcel/transformer-html": "^2.0.0-nightly.598",
58+
"@parcel/transformer-postcss": "^2.0.0-nightly.599",
59+
"@parcel/transformer-posthtml": "^2.0.0-nightly.598",
60+
"@parcel/transformer-webextension": "^2.0.0-nightly.2220",
61+
"npm-run-all": "^4.1.5",
62+
"parcel": "^2.0.0-nightly.596",
63+
"stylelint": "^13.10.0",
64+
"stylelint-config-xo": "^0.20.0",
65+
"xo": "^0.39.1"
66+
},
67+
"webExt": {
68+
"sourceDir": "distribution"
69+
},
70+
"targets": {
71+
"webext-dev": {
72+
"sourceMap": {
73+
"inline": true,
74+
"inlineSources": true
75+
}
76+
}
4877
}
4978
}

0 commit comments

Comments
 (0)