New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

stencil-react

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stencil-react

CLI tool to generate React bindings for Stencil v1 Components

latest
Source
npmnpm
Version
0.0.1-8
Version published
Maintainers
1
Created
Source

Update

Check out https://github.com/ionic-team/stencil-ds-plugins. You may want that instead of this.

stencil-react

npm package Build Status Coverage Status Dependencies Status

Generate React Components ("bindings") from Stencil 1.x projects.

Usage

Make sure your Stencil v1 component library (e.g, @anjuna/core) is installed as an npm dependency.

npm i stencil-react
stencil-react @anjuna/core --outDir dist

Options

OptionDescriptionDefault Value
--outDirOutput directorydist
--packageJsonOverride output package.json fieldsN/A
--packageJsonPathOverride output package.json fields from fileN/A

You cannot override fields ['main', 'module', 'types', 'peerDependencies', 'dependencies'].

Output

Your output directory will contain:

  • A package.json file with main, module, and types fields
  • An ES Module build of your React-wrapped Stencil components
  • A CommonJS build of your React-wrapped Stencil components
  • TypeScript types
  • Source Maps

Usage (In React)

The generated NPM package is the original, suffixed with -react.

All your Stencil Components will be exported from the main/module entry file. E.g., if you had a Button component:

import { Button } from '@anjuna/core-react';

Custom properties, custom events, synthentic React events, and aria-attributes are all supported:

import React from 'react';
import ReactDOM from 'react-dom';

const App = (
  <Button
    context="primary"
    anjBlur={(customBlurEvent) => { debugger; }}
    onClick={(syntheticReactClickEvent) => { debugger; }}
    aria-label="My ARIA Example"
  >
    Hello World
  </Button>
);

ReactDOM.render(<App />, document.body);

Keywords

stencil

FAQs

Package last updated on 31 Oct 2019

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