Skip to content

Commit

Permalink
Merge pull request diego3g#15 from Wilgnne/master
Browse files Browse the repository at this point in the history
Package script to generate the executable
  • Loading branch information
diego3g authored Jul 7, 2020
2 parents 85db959 + 8c46e89 commit f8cf564
Show file tree
Hide file tree
Showing 4 changed files with 540 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
packages
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ yarn install
```

## Usage
In order to run this project 2 scripts will need to be executed `dev:react` and `dev:electron`, run each one in a different terminal and always run `dev:react` before `dev:electron`.
In order to run this project 2 scripts will need to be executed `dev:react` and `dev:electron`, run each one in a different terminal and always run `dev:react` before `dev:electron`, or `dev` to run them in order automatically

```bash
npm run dev:react
Expand All @@ -23,6 +23,19 @@ npm run dev:react
npm run dev:electron
```

or

```bash
npm run dev
```

## Packaging
To generate a project package run `package`

```bash
npm run package
```



## Contributing
Expand Down
22 changes: 20 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
"main": "./dist/main.js",
"scripts": {
"dev": "npm-run-all -p dev:react electron:serve",
"dev:electron": "cross-env NODE_ENV=development webpack --config webpack/electron.webpack.js --mode development && electron .",
"dev:electron": "cross-env NODE_ENV=development webpack --config webpack/electron.webpack.js --mode development && npm run start:electron",
"dev:react": "cross-env NODE_ENV=development webpack-dev-server --config webpack/react.webpack.js --mode development",
"electron:serve": "wait-on http-get://localhost:4000/ && npm run dev:electron",
"build": "npm-run-all build:electron build:react && electron .",
"start:electron": "electron .",
"build": "npm-run-all build:electron build:react",
"build:run": "npm-run-all build start:electron",
"build:electron": "webpack --config webpack/electron.webpack.js",
"build:react": "webpack --config webpack/react.webpack.js",
"package": "npm-run-all build package:dist",
"package:dist": "electron-builder --dir",
"test": "jest"
},
"keywords": [],
Expand Down Expand Up @@ -38,6 +42,7 @@
"cross-env": "^7.0.2",
"cz-conventional-changelog": "3.2.0",
"electron": "^8.2.2",
"electron-builder": "^22.7.0",
"electron-devtools-installer": "^3.1.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
Expand Down Expand Up @@ -67,6 +72,19 @@
"react-dom": "^16.13.1",
"styled-components": "^5.1.1"
},
"build": {
"appId": "your.id",
"mac": {
"category": "public.app-category.video"
},
"directories": {
"output": "packages"
},
"files": [
"package.json",
"dist/**"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
Loading

0 comments on commit f8cf564

Please sign in to comment.