Skip to content

Commit 301fafc

Browse files
committed
Add support for setting module options via 'drupal-ce' key and document it like that.
1 parent d1a9b26 commit 301fafc

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ yarn add nuxtjs-drupal-ce # or npm install nuxtjs-drupal-ce
3131
```js
3232
{
3333
buildModules: [
34-
// Simple usage
3534
'nuxtjs-drupal-ce',
36-
37-
// With options
38-
['nuxtjs-drupal-ce', {
39-
baseURL: 'https://your-drupal.example.com'
40-
}]
41-
]
35+
],
36+
'drupal-ce', {
37+
baseURL: 'https://your-drupal.example.com',
38+
// more options...
39+
}
4240
}
4341
```
4442
3. Get started quickly by scaffolding initial files:

example/nuxt.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
modules: [
66
resolve(__dirname, '..')
77
],
8-
'nuxtjs-drupal-ce': {
8+
'drupal-ce': {
99
baseURL: 'http://localhost:3000/test-api/'
1010
}
1111
}

lib/module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = async function (moduleOptions) {
1515
const options = {
1616
...defaultOptions,
1717
...this.options['nuxtjs-drupal-ce'],
18+
...this.options['drupal-ce'],
1819
...moduleOptions
1920
}
2021

0 commit comments

Comments
 (0)