Generating a New Project
Generate a component
To generate a new React component in island-ui-core.
yarn generate @nx/react:component MyComponent --project=island-ui-coreGenerate an application
To generate a simple React application:
yarn generate @nx/react:app my-appTo get a React application with server-side-rendering, we recommend using Next.JS:
yarn generate @nx/next:app my-appTo create a service, you can get started with NestJS like this:
yarn generate @nx/nest:app services/my-serviceGenerate a library
To generate a React library.
yarn generate @nx/react:lib my-lib --linter eslintTo create a NestJS module:
yarn generate @nx/nest:lib my-libTo create a JS library that can be used both on the frontend and the backend:
yarn generate @nx/node:lib my-libLibraries are sharable across libraries and applications. They can be imported from @island.is/my-lib.
Applications and libraries can be structured in a hierarchy using subfolders:
yarn generate @nx/node:lib common/my-lib
# Imported from '@island.is/common/my-lib'Migrations
Using the sequelize-cli we support version controlled migrations that keep track of changes to the database.
Generate a migrations
yarn nx run <project>:migrate/generateMigrating
yarn nx run <project>:migrateLast updated
Was this helpful?