0.3.3 • Published 4 years ago

@alfheim/generator-nef-index v0.3.3

Weekly downloads
57
License
MIT
Repository
github
Last release
4 years ago

@alfheim/generator-nef-index

This package is part of the battery used to create new components for the Nasdaq Experience Framework. This package creates an index.tsx file, which contains the component.

Note: It is recommended that you install and use generator-nef-component rather than installing this package directly, unless you need to modify the individual file generators.

By default, a component named Test created using this generator looks as follows:

import React from "react";

import StyledTest from "./Test.styles";

export interface TestProps extends React.HTMLAttributes<HTMLElement> {}

const Test: React.FC<TestProps> = (props: TestProps) => (
  <StyledTest {...props} />
);

export default Test;

If you pass in the --class-component/-c flag while creating this component, it will instead look like the following:

import React, { Component } from "react";

import StyledTest from "./Test.styles";

export interface TestProps extends React.HTMLAttributes<HTMLElement> {} 

class Test extends Component<TestProps> {
  public render() {
    return <StyledTest {...this.props} />;
  }
}

export default Test;

Getting started

To install, simply run:

yarn add @alfheim/generator-nef-index --dev

or

npm install @alfheim/generator-nef-index --dev 

Contributing

We'd love to have your helping hand on alfheim! Go over to our issues section and see if there's anything we're looking for help with OR open up a PR if you have an idea for a way to improve the library.

License

Alfheim is open source software licensed as MIT.

0.3.3

4 years ago

0.3.2

4 years ago

0.3.0

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago