feat: use npm instead of yarn (issues with binaries)
This commit is contained in:
@@ -10,7 +10,7 @@ addons:
|
|||||||
services:
|
services:
|
||||||
- xvfb
|
- xvfb
|
||||||
install:
|
install:
|
||||||
- yarn install
|
- npm install
|
||||||
script:
|
script:
|
||||||
- yarn e2e
|
- npm run e2e
|
||||||
- yarn package
|
- npm run package
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -6,7 +6,6 @@
|
|||||||
<a href="https://github.com/sourcygen/electron-angular-quick-start/watchers"><img src="https://img.shields.io/github/watchers/sourcygen/electron-angular-quick-start.svg?style=social" alt="Watch on GitHub" align="right"></a>
|
<a href="https://github.com/sourcygen/electron-angular-quick-start/watchers"><img src="https://img.shields.io/github/watchers/sourcygen/electron-angular-quick-start.svg?style=social" alt="Watch on GitHub" align="right"></a>
|
||||||
<a href="https://github.com/sourcygen/electron-angular-quick-start/stargazers"><img src="https://img.shields.io/github/stars/sourcygen/electron-angular-quick-start.svg?style=social" alt="Star on GitHub" align="right"></a>
|
<a href="https://github.com/sourcygen/electron-angular-quick-start/stargazers"><img src="https://img.shields.io/github/stars/sourcygen/electron-angular-quick-start.svg?style=social" alt="Star on GitHub" align="right"></a>
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@@ -37,6 +36,7 @@ electron-angular-quick-start
|
|||||||
├── electron-builder.json
|
├── electron-builder.json
|
||||||
├── electron-webpack.json
|
├── electron-webpack.json
|
||||||
├── karma.conf.js
|
├── karma.conf.js
|
||||||
|
├── package-lock.json
|
||||||
├── package.json
|
├── package.json
|
||||||
├── src
|
├── src
|
||||||
│ ├── angular # Angular source directory (web part)
|
│ ├── angular # Angular source directory (web part)
|
||||||
@@ -45,15 +45,12 @@ electron-angular-quick-start
|
|||||||
├── tsconfig.app.json
|
├── tsconfig.app.json
|
||||||
├── tsconfig.json
|
├── tsconfig.json
|
||||||
├── tsconfig.spec.json
|
├── tsconfig.spec.json
|
||||||
├── tslint.json
|
└── tslint.json
|
||||||
└── yarn.lock
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
To clone and run this repository, you'll need [Git](https://git-scm.com), [Node.js](https://nodejs.org/en/download/), [Yarn](https://classic.yarnpkg.com/fr/docs/install) and [Angular-CLI](https://angular.io/cli) installed on your computer. And then from your command line:
|
To clone and run this repository, you'll need [Git](https://git-scm.com), [Node.js](https://nodejs.org/en/download/) and [Angular-CLI](https://angular.io/cli) installed on your computer. And then from your command line:
|
||||||
|
|
||||||
> [Yarn](http://yarnpkg.com/) is strongly recommended instead of npm (see this [issue](https://github.com/electron-userland/electron-builder/issues/1147#issuecomment-276284477)).
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# First, clone this repository
|
# First, clone this repository
|
||||||
@@ -63,24 +60,24 @@ git clone https://github.com/sourcygen/electron-angular-quick-start.git
|
|||||||
cd electron-angular-quick-start
|
cd electron-angular-quick-start
|
||||||
|
|
||||||
# After that, install dependencies
|
# After that, install dependencies
|
||||||
yarn install
|
npm install
|
||||||
|
|
||||||
# And finally run the app (dev mode)
|
# And finally run the app (dev mode)
|
||||||
yarn start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| ------------------- | ----------------------------------------- |
|
| ---------------------- | ----------------------------------------- |
|
||||||
| `yarn install` | Install dependencies |
|
| `npm run install` | Install dependencies |
|
||||||
| `yarn start` | Run the app on desktop (dev mode) |
|
| `npm run start` | Run the app on desktop (dev mode) |
|
||||||
| `yarn ng:serve` | Run the app on browser (dev mode) |
|
| `npm run ng:serve` | Run the app on browser (dev mode) |
|
||||||
| `yarn e2e` | Run glogbal end-to-end tests |
|
| `npm run e2e` | Run glogbal end-to-end tests |
|
||||||
| `yarn ng:e2e` | Run **angular** end-to-end tests |
|
| `npm run ng:e2e` | Run **angular** end-to-end tests |
|
||||||
| `yarn electron:e2e` | Run **electron** end-to-end tests |
|
| `npm run electron:e2e` | Run **electron** end-to-end tests |
|
||||||
| `yarn build` | Build artifact content |
|
| `npm run build` | Build artifact content |
|
||||||
| `yarn package` | Generate platform packages (dist/release) |
|
| `npm run package` | Generate platform packages (dist/release) |
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
|
|||||||
20935
package-lock.json
generated
Normal file
20935
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -23,20 +23,20 @@
|
|||||||
"ng:e2e": "ng e2e",
|
"ng:e2e": "ng e2e",
|
||||||
"ng:serve": "ng serve",
|
"ng:serve": "ng serve",
|
||||||
"ng:build": "ng build --prod --base-href ./",
|
"ng:build": "ng build --prod --base-href ./",
|
||||||
"electron:e2e": "yarn build && cross-env X_NODE_ENV=e2e-test node e2e/electron/jasmine.js",
|
"electron:e2e": "npm run build && cross-env X_NODE_ENV=e2e-test node e2e/electron/jasmine.js",
|
||||||
"electron:serve": "wait-on http://localhost:4200 && npm-run-all -p electron:build:tsc electron:build:webpack",
|
"electron:serve": "wait-on http://localhost:4200 && npm-run-all -p electron:build:tsc electron:build:webpack",
|
||||||
"electron:build:tsc": "tsc -b src/electron -w",
|
"electron:build:tsc": "tsc -b src/electron -w",
|
||||||
"electron:build:webpack": "wait-on dist/electron/preload.js && electron-webpack dev",
|
"electron:build:webpack": "wait-on dist/electron/preload.js && electron-webpack dev",
|
||||||
"electron:build": "tsc -b src/electron && electron-webpack",
|
"electron:build": "tsc -b src/electron && electron-webpack",
|
||||||
"e2e": "yarn ng:e2e && yarn electron:e2e",
|
"e2e": "npm run ng:e2e && npm run electron:e2e",
|
||||||
"start": "del -f dist && npm-run-all -p ng:serve electron:serve",
|
"start": "del -f dist && npm-run-all -p ng:serve electron:serve",
|
||||||
"build:dist": "del -f dist && yarn ng:build && yarn electron:build",
|
"build:dist": "del -f dist && npm run ng:build && npm run electron:build",
|
||||||
"build:copy:ng": "cpy '**/*' '../build' --cwd=dist/angular --parents",
|
"build:copy:ng": "cpy '**/*' '../build' --cwd=dist/angular --parents",
|
||||||
"build:copy:static": "cpy 'static' '../dist/build' --cwd=src --parents",
|
"build:copy:static": "cpy 'static' '../dist/build' --cwd=src --parents",
|
||||||
"build:copy:electron": "cpy '**/*' '../build' --cwd=dist/main --parents && yarn build:copy:static",
|
"build:copy:electron": "cpy '**/*' '../build' --cwd=dist/main --parents && npm run build:copy:static",
|
||||||
"build:copy": "cpy package.json dist/build && yarn build:copy:ng && yarn build:copy:electron",
|
"build:copy": "cpy package.json dist/build && npm run build:copy:ng && npm run build:copy:electron",
|
||||||
"build": "yarn build:dist && yarn build:copy && cd dist/build && yarn --prod",
|
"build": "npm run build:dist && npm run build:copy && cd dist/build && npm run --prod",
|
||||||
"package": "yarn build && electron-builder -p never",
|
"package": "npm run build && electron-builder -p never",
|
||||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
|
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user