[WARNING] You should use Node 16 to be able to use the project properly.
Node > 16 causes errors.
cd lukkoli
npm install --legacy-peer-deps
npm start
- runs all apps in monorepo in our case we have only one
cd lukkoli
npx nx generate @nrwl/js:lib api
or npx nx generate @nrwl/js:lib api --appProject=lukkolispace
Remember to stop the dev server and run npm start
again for affected code. Also, there will be probably a need to restart the TypeScript server.
cd lukkoli
npx nx run ui:storybook
cd lukkoli
npx nx g @nrwl/nest:app project-name
nx and @nrwl/node should have same versions
cd lukkoli
npx nx report
npm install nx@version --legacy-peer-deps
npm install @nrwl/node@version --legacy-peer-deps
cd lukkoli
npx nx serve lukkolispace
cd lukkoli
npx nx build project-name
Every scenario from the scenarios
directory should be covered with the e2e test.
Command to run e2e tests: npx nx e2e lukkolispace-e2e --watch
Up to you.
Command to run these tests: npm run test
or npx nx test --watch
.
If you want to run single project tests: npx nx test sm --watch
.
THIS CONVENTIONS/ARCHITECTURE SHOULD BE APPLIED ONLY TO FRONTEND APPLICATIONS NOT LIBRARIES OR BACKEND API's.
Pure presentational component but connected with application domain via interfaces -> getting props and renders content, nothing more. That component can know what is User but knows that only by domain interfaces.
interface UsersListComponentProps {}
const UsersListComponent = (props: UsersListComponentProps) => {
return <ul></ul>;
};
Have access to the application domain, can dispatch actions and trigger state changes in redux. The community uses the name Container but we will use Controller. It's because often in styling we often use Container. So Controller will be a file and architecture building block that manages communication with redux and decides which actions should be dispatched or injects data into Components.
File which exposes any state via Context API. In our case we using redux so this should be only UI-related state or other metadata. This file should have also a hook that exposes access to Context API and hides the option to directly import created Context.
Entry point for dedicated feature in-app. Manages lazy loading, and pre-fetching data.