4.6.5 • Published 5 months ago

@pantheon-systems/drupal-kit v4.6.5

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
5 months ago

Pantheon Systems Drupal Kit

Utilities to help simplify the process of sourcing data from a Drupal backend for a Front-End Site hosted on Pantheon.

Installation

To install this package to use in your application:

npm install @pantheon-systems/drupal-kit

Usage

Modules can be imported from the @pantheon-systems/drupal-kit package. For example, to use Drupal State to source data from your CMS backend:

DrupalState

  1. Import DrupalState in your JavaScript application:
    import { DrupalState } from ' @pantheon-systems/drupal-kit';
  2. Create an instance of the store and specify the root of your API:
    const store = new DrupalState({
    	apiBase: 'https://dev-ds-demo.pantheonsite.io',
    });
  3. Get a collection of objects:
    const recipesFromApi = await store.getObject({ objectName: 'node--recipe' });
  4. Get a single object:
    const recipeFromStore = await store.getObject({
    	objectName: 'node--recipe',
    	id: '33386d32-a87c-44b9-b66b-3dd0bfc38dca',
    });

For more information, consult the full Drupal State documentation

API Reference

To see the API reference for @pantheon-systems/drupal-kit, visit our docs site

Contributing

Please see the Contributing guide in our monorepo to contribute to the project.

4.6.5

5 months ago

4.6.5-canary.0

5 months ago

4.6.3

8 months ago

4.6.2

10 months ago

4.6.4

7 months ago

4.6.4-canary.0

8 months ago

4.6.2-canary.0

11 months ago

4.6.3-canary.1

8 months ago

4.6.3-canary.0

8 months ago

4.5.0-canary.0

1 year ago

4.6.1-canary.0

11 months ago

4.5.0

1 year ago

4.6.1

11 months ago

4.6.0

12 months ago

4.6.0-canary.1

12 months ago

4.6.0-canary.0

1 year ago

4.3.1-canary.0

1 year ago

4.4.0-canary.1

1 year ago

4.2.1-canary.0

1 year ago

4.2.2-canary.0

1 year ago

4.3.0-canary.1

1 year ago

4.4.0

1 year ago

4.3.0

1 year ago

4.2.1

1 year ago

4.2.0-canary.0

1 year ago

4.2.0

1 year ago

4.1.0-canary.0

1 year ago

4.1.0

1 year ago

4.0.0-canary.0

1 year ago

4.0.0

1 year ago

3.1.0-canary.0

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.1-canary.0

2 years ago

3.0.0

2 years ago

3.0.0-canary.0

2 years ago

2.2.0

2 years ago

2.2.0-canary.0

2 years ago

1.1.5

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.4

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago