@jrantunes/cra-template

1.0.2 • Public • Published

CRA-TEMPLATE

A initial template to React projects using Create React App

Installing

  1. Use this template with the cra command

    Using npm:

    $ npx create-react-app my-app --template @jrantunes/cra-template

    Using yarn:

    $ yarn create react-app my-app --template @jrantunes/cra-template
  2. Run the prepare script to setup husky pre-commit

    Using npm:

    $ npm run prepare

    Using yarn:

    $ yarn prepare

    Lint-staged is configured to run the linting(with --max-warnings=0) and test scripts if one of these two fails the changes wont be commited

  3. Start your app

    Using npm:

    $ npm run start

    Using yarn:

    $ yarn start
  4. To automatically create your component folder you can use the generate script

    Using npm:

    $ npm run generate ComponentName

    Using yarn:

    $ yarn generate ComponentName

    The generated folder will contain the following files:

    • index.tsx - The component file

    • {{ component_name }}.spec.tsx - The tests of the component

    • stories.tsx - The stories of the component

    • styles.ts - The styles of the component

This template uses the following dependencies:

Package Sidebar

Install

npm i @jrantunes/cra-template

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

39.3 kB

Total Files

36

Last publish

Collaborators

  • joseantunes