@friendsofshopware/storefront-sdk
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@friendsofshopware/storefront-sdk", | ||
"description": "Provides Shopware Storefront Utilities as Typescript", | ||
"main": "sdk.js", | ||
"types": "sdk.d.ts", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"publish-to-npm": "rm -rf dist; tsc --build && cp package.json dist && cat ./package.json | grep -v '\\\"private\\\":' > dist/package.json; cp README.md dist", | ||
"publish-to-npm": "rm -rf dist; tsc --build && cp package.json dist && cat ./package.json | grep -v '\\\"private\\\":' > dist/package.json; cp README.md dist; cp index.d.ts dist", | ||
"test": "bun test" | ||
@@ -28,3 +28,3 @@ }, | ||
}, | ||
"version": "0.1.0" | ||
"version": "0.1.1" | ||
} |
@@ -28,3 +28,6 @@ import NativeEventEmitter from "./NativeEventEmitter"; | ||
const plugin = window.PluginManager.getPlugin(this._pluginName, false); | ||
plugin.get('instances').push(this); | ||
if (plugin.has('instances')) { | ||
const instances = plugin.get('instances'); | ||
instances.push(this); | ||
} | ||
} | ||
@@ -31,0 +34,0 @@ _getPluginName(pluginName) { |
@@ -41,2 +41,14 @@ # Shopware Storefront SDK | ||
## TSConfig | ||
To have `PluginManager` typed, you need to create a `tsconfig.json` (`src/Resources/app/storefront/tsconfig.json`) with following content: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"types": ["@friendsofshopware/storefront-sdk"] | ||
} | ||
} | ||
``` | ||
## Usage | ||
@@ -43,0 +55,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14240
13
309
85