You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

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

0.5.0
Source
npmnpm
Version published
Weekly downloads
50K
-10.4%
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

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

Keywords

svelte

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