1.1.0 • Published 5 years ago

metal-gen-component v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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 {}


// ----------
1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago