Socket
Socket
Sign inDemoInstall

svelte-dev-helper

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-dev-helper

Helper for svelte components to ease development


Version published
Weekly downloads
37K
decreased by-1.83%
Maintainers
1
Weekly downloads
 
Created
Source

svelte-dev-helper

Helper for svelte components to ease development

##Usage

This is meant to be used under the hood for creating a build toolchain, or a dev helper based on Svelte components;

import {Registry, configure, createProxy} from 'svelte-dev-helper';
import Component from './Component.html'; //some svelte component

configure(configOptions);

const id = someUniqueID();

Registry.set(id, {
  component: Component,
  instances:[]
});

export createProxy(id);

The component returned by createProxy now does the following

  1. Add a <!--<Component>--> comment marker in the DOM just above where the component's DOM starts
  2. You can access the component instance using $0.__component__ in devtools after higlighting the comment marker from above.

Keywords

FAQs

Package last updated on 09 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc