Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Update deprecated flag and homepage field #358

Merged
merged 1 commit into from
Jun 3, 2018
Merged
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lightning-app",
"version": "0.1.0",
"description": "Lightning Wallet Application",
"homepage": "https://lightning.engineering",
"homepage": "./",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm docs say this attribute is for the project homepage? https://docs.npmjs.com/files/package.json#homepage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/facebook/create-react-app/blob/ca7d227ae0354e04941ba0e4f76c0bcbf3050dfa/config/webpack.config.prod.js#L20-L23 create-react-app uses package.json's homepage field when it creates the webpack config as webpack's publicPath, which is what the static files are served from. Got this fix from here: facebook/create-react-app#165 lmk if it isn't acceptable

"license": "GPL-3.0",
"private": true,
"main": "public/electron.js",
Expand All @@ -16,7 +16,7 @@
"test:react": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"electron-dev": "concurrently \"BROWSER=none npm start\" \"wait-on http://localhost:3000 && electron --enable-sandbox .\"",
"electron-pack": "build --em.main=build/electron.js",
"electron-pack": "build --c.extraMetadata.main=build/electron.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this fixes the build?

Copy link
Contributor Author

@valentinewallace valentinewallace Jun 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both changes are necessary

"electron-only": "electron --enable-sandbox .",
"preelectron-pack": "npm run build",
"prettier": "prettier --write --single-quote --trailing-comma es5 \"src/**/*.js\" public/electron.js",
Expand Down