Skip to content

Commit

Permalink
feat: 🎸 #7 add missing mac application icon (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbentoneves authored Jun 14, 2022
1 parent d207890 commit c3b4567
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 33 deletions.
20 changes: 20 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
webpack: {
configure: (webpackConfig, { env, paths }) => {

const copyWebPackPlugin = new CopyWebpackPlugin({
patterns: [
// Copy icon to build folder
{ from: path.resolve(__dirname, 'src/assets/icon.*'), to: path.resolve(__dirname, 'build/[name][ext]') },
// Copy background to build folder
{ from: path.resolve(__dirname, 'src/assets/background.*'), to: path.resolve(__dirname, 'build/[name][ext]') }
],
});

webpackConfig.plugins = [...webpackConfig.plugins, copyWebPackPlugin];

return webpackConfig;
}
}
};
25 changes: 25 additions & 0 deletions electron-builder.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": null,
"files": ["build/**/*"],
"directories": {
"buildResources": "assets"
},
"extraResources": [
{
"from": "src/assets",
"to": "assets",
"filter": ["**/*"]
}
],
"publish": [
{
"provider": "github",
"owner": "nbentoneves",
"repo": "hi-pr"
}
],
"mac": {
"icon": "build/icon.png",
"publish": ["github"]
}
}
36 changes: 3 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,16 @@
"start": "craco start",
"build": "craco build",
"test": "DEBUG_PRINT_LIMIT=10000 craco test --silent",
"postinstall": "electron-builder install-app-deps",
"electron:postinstall": "electron-builder install-app-deps",
"electron:dev": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://127.0.0.1:3000 && tsc -p electron -w\" \"wait-on http://127.0.0.1:3000 && tsc -p electron && electron .\"",
"electron:build": "yarn build && tsc -p electron && electron-builder",
"publish": "yarn build && tsc -p electron && electron-builder --publish always",
"electron:build": "yarn build && tsc -p electron && electron-builder --config electron-builder.config.json",
"publish": "yarn build && tsc -p electron && electron-builder --config electron-builder.config.json --publish always",
"lint": "eslint --ext .ts,.tsx src/**/*"
},
"repository": {
"type": "git",
"url": "https://github.com/nbentoneves/hi-pr"
},
"build": {
"extends": null,
"files": [
"build/**/*"
],
"directories": {
"buildResources": "assets"
},
"extraResources": [
{
"from": "src/assets",
"to": "assets",
"filter": [
"**/*"
]
}
],
"publish": [
{
"provider": "github",
"owner": "nbentoneves",
"repo": "hi-pr"
}
],
"mac": {
"publish": [
"github"
]
}
},
"eslintConfig": {
"extends": [
"react-app",
Expand Down
Binary file added src/assets/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/background@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c3b4567

Please sign in to comment.