Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic stub generation #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Automatic stub generation #17

wants to merge 1 commit into from

Conversation

emilianobovetti
Copy link
Member

@emilianobovetti emilianobovetti commented Oct 21, 2019

Generare componenti in automatico da uno stub è 😎, ma trovo scomodo configurare gli strumenti per aderire a tutte le convenzioni che abbiamo deciso di adottare. Visto che creare uno script era molto semplice ho pensato di fare questa proposta:

yarn gen component Test produce questo

app
└── components
    └── Test
        ├── index.js
        └── Test.js

index.js

export { Test } from './Test';

Test.js

import React from 'react';
import { View, Text } from 'react-native';

export function Test(props) {
  return (
    <View>
      <Text>hello, world</Text>
    </View>
  );
}

yarn gen screen Test fa la stessa cosa in screens

app
└── screens
    └── Test
        ├── index.js
        └── Test.js

As a bonus: ho creato l'org hitbit su npm (che fa super fico) 🎉

Fatemi sapere che ne pensate 👋

@matteocarpi
Copy link
Contributor

Miiiitico.

Bello mi piace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants