Code Monkey home page Code Monkey logo

admin-extension-sdk's Introduction

Admin Extension SDK

Tests NPM Package

The admin-extension-sdk is a JavaScript library for all Shopware 6 App and Plugin developer which want an easy way to extend and customize the administration.

See Documentation

Installation

Using NPM:

Install it to your package.json

npm i --save @shopware-ag/admin-extension-sdk

and import it in your app:

// import everything
import * as sw from '@shopware-ag/admin-extension-sdk';

// or import only needed functionality
import { notification }  from '@shopware-ag/admin-extension-sdk';

Using CDN:

Import the source from the CDN

// use the latest version available
<script src="https://unpkg.com/@shopware-ag/admin-extension-sdk/cdn"></script>

// use a fix version (example here: 1.2.3)
<script src="https://unpkg.com/@shopware-ag/[email protected]/cdn"></script>

and then you can access it with the global variable sw.

sw.notification.dispatch({
  title: 'My first notification',
  message: 'This was really easy to do'
})

Features

  • ๐Ÿ— Works with Shopware 6 Apps and Plugins: you can use the SDK for your plugins or apps. API usage is identical.
  • ๐ŸŽข Shallow learning curve: you don't need to have extensive knowledge about the internals of the Shopware 6 Administration. Our SDK hides the complicated stuff behind a beautiful API.
  • ๐Ÿงฐ Many extension capabilities: from throwing notifications, accessing context information or extending the current UI. The feature set of the SDK will gradually be extended, providing more possibilities and flexibility for your ideas and solutions.
  • ๐Ÿชจ A stable API with great backwards compatibility: don't fear Shopware updates anymore. Breaking changes in this SDK are an exception. If you use the SDK, your apps and plugins will stay stable for a longer time, without any need for code maintenance.
  • ๐Ÿงญ Type safety: the whole SDK is written in TypeScript which provides great autocompletion support and more safety for your apps and plugins.
  • ๐Ÿ’™ Developer experience: have a great development experience right from the start. And it will become better and better in the future.
  • ๐Ÿชถ Lightweight: the whole library is completely tree-shakable and dependency-free. Every functionality can be imported granularly to keep your bundle as small and fast as possible.

Examples

Throw a notification:

sw.notification.dispatch({
  title: 'My first notification',
  message: 'This was really easy to do'
})

Get the system currency:

const currency = await sw.context.getCurrency();

Subscribe for UI locale changes:

let currentLocale = 'en-GB';

sw.context.subscribeLocale(({ locale }) => {
  currentLocale = locale;
})

See more examples in the Documentation.

admin-extension-sdk's People

Contributors

jleifeld avatar seggewiss avatar bojanrajh avatar marcelbrode avatar tobiasberge avatar htkassner avatar jkrzefski avatar shyim avatar dneustadt avatar

Watchers

Sammy filly  avatar

Forkers

renovate-bot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.