Skip to content

Commit

Permalink
docs: use new nuxi module add command and improve setup docs (#214)
Browse files Browse the repository at this point in the history
* docs: use new `nuxi module add` command in installation

* Update README.md

* Update README.md

---------

Co-authored-by: Wolfgang Ziegler <[email protected]>
  • Loading branch information
danielroe and fago authored Aug 14, 2024
1 parent 87e5964 commit 11b2b8f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nuxtjs-drupal-ce - Nuxt.js Drupal Custom Elements Connector
# nuxtjs-drupal-ce - Nuxt Drupal Custom Elements Connector

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
Expand All @@ -21,13 +21,19 @@ The 2.x version of the module is compatible with Nuxt 3. For a Nuxt 2 compatible

## Setup

1. Add `nuxtjs-drupal-ce` dependency to your Nuxt project
1. Go to your Nuxt project. If necessary, start a new one:

```bash
yarn add nuxtjs-drupal-ce@beta # or npm install nuxtjs-drupal-ce@beta
npx nuxi@latest init <project-name>
```

2. Add `nuxtjs-drupal-ce` to the `modules` section of `nuxt.config.js`
2. Add the `nuxtjs-drupal-ce` module to your Nuxt project

```bash
npx nuxi@latest module add drupal-ce
```

3. Configure `nuxtjs-drupal-ce` in your `nuxt.config.js`

```js
export default defineNuxtConfig({
Expand All @@ -40,11 +46,10 @@ export default defineNuxtConfig({
}
})
```

The module defaults work well with [Lupus Decoupled Drupal](https://www.drupal.org/project/lupus_decoupled) - in that case setting the
The module defaults work well with [Lupus Decoupled Drupal](https://drupal.org/project/lupus_decoupled) - in that case setting the
`drupalBaseUrl` is enough to get started.

3. Get started quickly by scaffolding initial files:
4. Scaffold initial files. After scaffolding, edit them as suiting.
```bash
rm -f app.vue && npx nuxt-drupal-ce-init
```
Expand Down

0 comments on commit 11b2b8f

Please sign in to comment.