Coder Social home page Coder Social logo

cra-to-nx's Introduction

CRA - to - Nx

This package will turn your React app into an Nx workspace. To use this package, your React app must have been generated and kept the structure of Create-React-App, with files generated either in js/jsx or ts/tsx.

This tool follows the steps described in this migration guide, with some enhancements.

It will, essentially, generate a new Nx workspace, and then place your existing CRA React app in the apps directory of the Nx workspace, while configuring the Nx workspace as needed.

Before starting

As this package will change your folder structure and edit some of your files, you must commit any local changes you have, to start with clean history. In any case, to protect you, the package will exit if there are local uncommited changes.

How to use

Go to your CRA React app directory and run the following command:

npx cra-to-nx

Then just sit back and wait. After a while you will be able to take advantage of the full magic of Nx.

Ok, it's done, what do I do now?

Run, build, lint, test

You can try the following commands:

nx serve your-app-name
nx build your-app-name
nx lint your-app-name
nx test your-app-name

Generate code

Take a look at this guide

Or just try generating a library:

nx generate lib ui-button

Courses, guides, docs

So, now I just have my React app in a monorepo?

No. You have your React app in an Nx workspace. So you also have the full power of Nx tools. You can watch this 10-minute quick overview if you want to know more.

cra-to-nx's People

Contributors

mandarini avatar jaysoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.