Drupal svelte component menu

This project is not covered by Drupal’s security advisory policy.

Drupal svelte component menu

A decoupled menu component for Drupal.

TODO

Setting up

  • Run npm init (or yarn init)

Available tasks.

Refer to available tasks inside package.json "scripts" for latest.

  • yarn run build to build the component
  • yarn run autobuild to build the component while developing, to build continusly upon source code update.
  • yarn run dev to start a local development server for testing and as well as run autobuild.
  • yarn start to serve example.
  • yarn start to serve example in dev mode.

Consuming components

Your package.json has a "svelte" field pointing to src/index.js, which allows Svelte apps to import the source code directly, if they are using a bundler plugin like rollup-plugin-svelte or svelte-loader (where resolve.mainFields in your webpack config includes "svelte"). This is recommended.

For everyone else, npm run build will bundle your component's source code into a plain JavaScript module (dist/index.mjs) and a UMD script (dist/index.js).

Supporting organizations: 
Development

Project information

Releases