Skip to content

Commit b53a0ea

Browse files
committed
add env vars available in the app
1 parent 5c63e61 commit b53a0ea

File tree

7 files changed

+14
-18
lines changed

7 files changed

+14
-18
lines changed

.env

Whitespace-only changes.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@babel/preset-react": "^7.0.0",
3535
"babel-loader": "^8.0.6",
3636
"copy-webpack-plugin": "^5.0.4",
37+
"dotenv": "^8.2.0",
3738
"file-loader": "^4.2.0",
3839
"gh-pages": "^2.1.1",
3940
"husky": "^3.0.9",

src/app/_locales/en/messages.json

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

src/app/manifest.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
{
2-
"name": "Swipe hand in the air",
2+
"name": "chrome-extension-boilerplate",
33
"version": "0.0.1",
44
"manifest_version": 2,
5-
"description": "swipe hand gesture recognition",
5+
"description": "description",
66
"icons": {
77
"16": "images/icon-16.png",
88
"128": "images/icon-128.png"
99
},
10-
"default_locale": "en",
1110
"background": {
1211
"scripts": ["background.bundle.js"]
1312
},
14-
"permissions": ["history", "webNavigation", "*://*/*"],
13+
"permissions": ["storage", "webNavigation", "*://*/*"],
1514
"browser_action": {
1615
"default_icon": {
1716
"19": "images/icon-19.png",
1817
"38": "images/icon-38.png"
1918
},
20-
"default_title": "history remover",
19+
"default_title": "default title",
2120
"default_popup": "popup.html"
2221
},
2322
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"

src/app/styles/main.css

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

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const webpack = require("webpack");
22
const CopyWebpackPlugin = require("copy-webpack-plugin");
3+
const dotenv = require("dotenv").config({ path: __dirname + "/.env" });
34

45
module.exports = {
56
entry: {
@@ -47,6 +48,9 @@ module.exports = {
4748
],
4849
{}
4950
),
51+
new webpack.DefinePlugin({
52+
"process.env": dotenv.parsed
53+
}),
5054
new webpack.HotModuleReplacementPlugin()
5155
],
5256
devServer: {

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,6 +2534,11 @@ domutils@^1.7.0:
25342534
dom-serializer "0"
25352535
domelementtype "1"
25362536

2537+
dotenv@^8.2.0:
2538+
version "8.2.0"
2539+
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
2540+
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
2541+
25372542
download@^6.2.2:
25382543
version "6.2.5"
25392544
resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714"

0 commit comments

Comments
 (0)