Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change npm init commands for npx #212

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
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 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.
Loading