
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@core-design/components
Advanced tools
This repo leverages Lerna, a tool for managing multiple packages within the same repo.
Lerna takes the place of typical npm
and yarn
commands. For a full breakdown of lerna
commands, see the lerna readme
To start developing your Stencil project, run:
From root
:
lerna run start
To start developing your Stencil project in Storybook, run:
From root
:
lerna run storybook
Stencil components are plain ES6/TypeScript classes with some decorator metadata.
Create new components by creating files with a .tsx
extension, such as core-component.tsx
, and place them in src/components
.
import { Component, Prop, h } from "@stencil/core";
@Component({
tag: "core-component",
styleUrl: "core-component.css",
})
export class Component {
@Prop() first: string;
@Prop() last: string;
render() {
return (
<div>
Hello, my name is {this.first} {this.last}
</div>
);
}
}
To use this component, just use it like any other HTML element:
<core-component first="Stencil" last="JS"></core-component>
When creating new component tags, use the core-
prefix and kebab-case.
For example: core-button
, core-icon
, etc. Custom Elements must contain a dashed name so they do not collide with existing html element names.
The API for Stencil closely mirrors the API for Custom Elements v1.
Decorator | Description |
---|---|
@Component() | Indicate a class is a Stencil component. |
@Prop() | Creates a property that will exist on the element and be data-bound to this component. |
@State() | Creates a local state variable that will not be placed on the element. |
@Method() | Expose specific methods to be publicly accessible. |
View high level component example here
Web Components, specifically Custom Elements, are natively supported in Chrome and Safari and are coming to both Edge and Firefox. A dynamic polyfill loader is already included in order to only load the polyfills for the browsers that are missing specific features.
Stencil includes a subset of the core-js
polyfills for old browsers like IE11, fetch
and conditionally downloads the Custom Elements v1 only when it's needed for modern browsers (EDGE and old versions of Firefox.)
View IE11 polyfill details here
In addition, the following set of polyfills are also included:
Some modern browsers like Edge do not include native support for Web Components. In that case, we conditionally load the Custom Elements v1 polyfill.
FAQs
Core Design System Components
We found that @core-design/components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.