Socket
Book a DemoInstallSign in
Socket

metal-gen-component

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metal-gen-component

Metal JSX component boilerplate

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Metal Generate Component

Generate a Metal.js JSX component and SCSS file at working directory using CSS Modules syntax

Installation

npm install --global metal-gen-component

Usage

This generator takes one argument. Component name in kebab-format.

metalgen <component-name>
smelt <component-name>

example:

metalgen my-application
smelt my-application

outputs in your current working directory:

MyApplication.js

import Component, {Config} from 'metal-jsx';

import './MyApplication.scss';

export default class MyApplication extends Component {
	created() {}

	attached() {}

	render() {
		return (
			<div class="my-application-container">

			</div>
		);
	}
}

MyApplication.PROPS = {}

MyApplication.STATE = {}

// ----------

MyApplicaiton.scss

@import "~styles/variables";

.my-application-container {}


// ----------

FAQs

Package last updated on 08 May 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.