Skip to content

Commit

Permalink
fix: change npm init commands for npx (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao authored Dec 11, 2024
1 parent 50ddba5 commit 2509154
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Electron Forge currently only supports npm and Yarn Classic. If you are using Ya
{% endhint %}

```bash
npm init electron-app@latest my-app
npx create-electron-app@latest my-app
```

### Using templates

Forge's initialization scripts can add additional template code with the `--template=[template-name]` flag.

```bash
npm init electron-app@latest my-app -- --template=webpack
npx create-electron-app@latest my-app --template=webpack
```

There are currently four first-party templates:
Expand Down
2 changes: 1 addition & 1 deletion guides/framework-integration/vue-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following guide has been tested with Vue 3 and Vite 4.
Create an Electron app using Electron Forge's [Vite](../../templates/vite.md) template.

```bash
npm init electron-app@latest my-vue-app -- --template=vite
npx create-electron-app@latest my-vue-app --template=vite
```

## Adding dependencies
Expand Down
2 changes: 1 addition & 1 deletion templates/typescript-+-webpack-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Create a new Electron app with webpack and TypeScript.
To get you up and running as fast as possible with [TypeScript](https://www.typescriptlang.org/) and [webpack](https://webpack.js.org/), we provide a template that makes use of the [`@electron-forge/plugin-webpack` module](../config/plugins/webpack.md) with sane TypeScript configuration defaults.

```bash
npm init electron-app@latest my-new-app -- --template=webpack-typescript
npx create-electron-app@latest my-new-app --template=webpack-typescript
```

{% hint style="warning" %}
Expand Down
2 changes: 1 addition & 1 deletion templates/vite-+-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For more context, see the Electron Forge [v7.5.0 release notes](https://github.c
To get you up and running as fast as possible with [TypeScript](https://www.typescriptlang.org/) and [Vite](https://vitejs.dev/), we provide a template that makes use of the [`@electron-forge/plugin-vite` module](../config/plugins/vite.md) with sane TypeScript configuration defaults.

```bash
npm init electron-app@latest my-new-app -- --template=vite-typescript
npx create-electron-app@latest my-new-app --template=vite-typescript
```

Once you've initialized the template, you'll need to run `npm start` in the generated directory.
Expand Down
2 changes: 1 addition & 1 deletion templates/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For more context, see the Electron Forge [v7.5.0 release notes](https://github.c
To get you up and running as fast as possible with [Vite](https://vitejs.dev/), we provide a template that makes use of the [`@electron-forge/plugin-vite` module](../config/plugins/vite.md), plus some preset Vite configuration options.

```bash
npm init electron-app@latest my-new-app -- --template=vite
npx create-electron-app@latest my-new-app --template=vite
```

Once you've initialized the template, you'll need to run `npm start` in the generated directory.
Expand Down
2 changes: 1 addition & 1 deletion templates/webpack-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Create a new Electron app with Webpack
To get you up and running as fast as possible with the [webpack](https://webpack.js.org) bundler, we provide a template that makes use of the [`@electron-forge/plugin-webpack` module](../config/plugins/webpack.md), plus some preset webpack configuration options. This is by far the quickest way to getting a working webpack setup with Electron.

```bash
npm init electron-app@latest my-new-app -- --template=webpack
npx create-electron-app@latest my-new-app --template=webpack
```

Once you've initialized the template, you'll need to run `npm start` in the generated directory. See the [Webpack Plugin](../config/plugins/webpack.md) documentation for Electron Forge-specific configuration options.

0 comments on commit 2509154

Please sign in to comment.