Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit137fad8

Browse files
committed
add docs
1 parent48fcd94 commit137fad8

File tree

3 files changed

+181
-51
lines changed

3 files changed

+181
-51
lines changed

‎NX.md‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#TfTest
2+
3+
This project was generated using[Nx](https://nx.dev).
4+
5+
<palign="center"><imgsrc="https://raw.githubusercontent.com/nrwl/nx/master/nx-logo.png"width="450"></p>
6+
7+
🔎**Nx is a set of Extensible Dev Tools for Monorepos.**
8+
9+
##Adding capabilities to your workspace
10+
11+
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
12+
13+
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
14+
15+
Below are some plugins which you can add to your workspace:
16+
17+
-[React](https://reactjs.org)
18+
-`npm install --save-dev @nrwl/react`
19+
- Web (no framework frontends)
20+
-`npm install --save-dev @nrwl/web`
21+
-[Angular](https://angular.io)
22+
-`npm install --save-dev @nrwl/angular`
23+
-[Nest](https://nestjs.com)
24+
-`npm install --save-dev @nrwl/nest`
25+
-[Express](https://expressjs.com)
26+
-`npm install --save-dev @nrwl/express`
27+
-[Node](https://nodejs.org)
28+
-`npm install --save-dev @nrwl/node`
29+
30+
##Generate an application
31+
32+
Run`nx g @nrwl/react:app my-app` to generate an application.
33+
34+
>You can use any of the plugins above to generate applications as well.
35+
36+
When using Nx, you can create multiple applications and libraries in the same workspace.
37+
38+
##Generate a library
39+
40+
Run`nx g @nrwl/react:lib my-lib` to generate a library.
41+
42+
>You can also use any of the plugins above to generate libraries as well.
43+
44+
Libraries are sharable across libraries and applications. They can be imported from`@tf-test/mylib`.
45+
46+
##Development server
47+
48+
Run`nx serve my-app` for a dev server. Navigate tohttp://localhost:4200/. The app will automatically reload if you change any of the source files.
49+
50+
##Code scaffolding
51+
52+
Run`nx g @nrwl/react:component my-component --project=my-app` to generate a new component.
53+
54+
##Build
55+
56+
Run`nx build my-app` to build the project. The build artifacts will be stored in the`dist/` directory. Use the`--prod` flag for a production build.
57+
58+
##Running unit tests
59+
60+
Run`nx test my-app` to execute the unit tests via[Jest](https://jestjs.io).
61+
62+
Run`nx affected:test` to execute the unit tests affected by a change.
63+
64+
##Running end-to-end tests
65+
66+
Run`ng e2e my-app` to execute the end-to-end tests via[Cypress](https://www.cypress.io).
67+
68+
Run`nx affected:e2e` to execute the end-to-end tests affected by a change.
69+
70+
##Understand your workspace
71+
72+
Run`nx dep-graph` to see a diagram of the dependencies of your projects.
73+
74+
##Further help
75+
76+
Visit the[Nx Documentation](https://nx.dev) to learn more.

‎README.md‎

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,69 @@
1-
#TfTest
1+
#Welcome to tf-react-coding-test 👋
22

3-
This project was generated using[Nx](https://nx.dev).
3+
![Version](https://img.shields.io/badge/version-0.1.1-blue.svg?cacheSeconds=2592000)
4+
[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://github.com/sebastiandg7/tf-react-coding-test/blob/master/README.md)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)
6+
[![Twitter: sebastiandg7](https://img.shields.io/twitter/follow/sebastiandg7.svg?style=social)](https://twitter.com/sebastiandg7)
47

5-
<palign="center"><imgsrc="https://raw.githubusercontent.com/nrwl/nx/master/nx-logo.png"width="450"></p>
8+
>react coding challenge
69
7-
🔎**Nx is a set of Extensible Dev Tools for Monorepos.**
10+
###🏠[Homepage](https://github.com/sebastiandg7/tf-react-coding-test)
811

9-
##Adding capabilities to your workspace
12+
###[Demo](https://sebastiandg7.github.io/tf-react-coding-test/)
1013

11-
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
14+
##Usage
1215

13-
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
16+
###Install
1417

15-
Below are some plugins which you can add to your workspace:
18+
```sh
19+
npm install
20+
```
1621

17-
-[React](https://reactjs.org)
18-
-`npm install --save-dev @nrwl/react`
19-
- Web (no framework frontends)
20-
-`npm install --save-dev @nrwl/web`
21-
-[Angular](https://angular.io)
22-
-`npm install --save-dev @nrwl/angular`
23-
-[Nest](https://nestjs.com)
24-
-`npm install --save-dev @nrwl/nest`
25-
-[Express](https://expressjs.com)
26-
-`npm install --save-dev @nrwl/express`
27-
-[Node](https://nodejs.org)
28-
-`npm install --save-dev @nrwl/node`
22+
###Serve
2923

30-
##Generate an application
24+
```sh
25+
npm start react-coding-test
26+
```
3127

32-
Run`nx g @nrwl/react:app my-app` to generate an application.
28+
###Dependency graph
3329

34-
>You can use any of the plugins above to generate applications as well.
30+
```sh
31+
npm run dep-graph
32+
```
3533

36-
When using Nx, you can create multiple applications and libraries in the same workspace.
34+
##Used libs & techniques
3735

38-
##Generate a library
36+
-**[Nx](https://nx.dev/):** workspace & dev tools
37+
-**[standard-version](https://github.com/conventional-changelog/standard-version):** automatic versioning & changelog generation
38+
-**[Lazy loading](https://reactjs.org/docs/code-splitting.html#reactlazy):** lazy load application features
39+
-**[Redux Dynamic Modules](https://redux-dynamic-modules.js.org/):** modular Redux state management loaded on demand
40+
-**[Faker.js](https://github.com/marak/Faker.js):** fake data generation
41+
-**[Formik]():** forms handling
42+
-**[Yup]():** data validation
43+
-**[destyle.css](https://nicolas-cusan.github.io/destyle.css):** CSS reset
3944

40-
Run`nx g @nrwl/react:lib my-lib` to generate a library.
45+
##Workspace setup
4146

42-
>You canalso use any of the plugins above to generate libraries as well.
47+
You canfind all the generated code script under[`./tools/workpsace-setup.sh`](/tools/workpsace-setup.sh) (suitable for worksapce architecture replication)
4348

44-
Libraries are sharable across libraries and applications. They can be imported from`@tf-test/mylib`.
49+
##Author
4550

46-
##Development server
51+
👤**Sebastián Duque Gutiérrez**
4752

48-
Run`nx serve my-app` for a dev server. Navigate tohttp://localhost:4200/. The app will automatically reload if you change any of the source files.
53+
- Twitter:[@sebastiandg7](https://twitter.com/sebastiandg7)
54+
- Github:[@sebastiandg7](https://github.com/sebastiandg7)
55+
- LinkedIn:[@sebastianduqueg](https://linkedin.com/in/sebastianduqueg)
4956

50-
##Code scaffolding
57+
##🤝 Contributing
5158

52-
Run`nx g @nrwl/react:component my-component --project=my-app` to generate a new component.
59+
Contributions, issues and feature requests are welcome!
5360

54-
##Build
61+
Feel free to check[issues page](https://github.com/sebastiandg7/tf-react-coding-test/issues).
5562

56-
Run`nx build my-app` to build the project. The build artifacts will be stored in the`dist/` directory. Use the`--prod` flag for a production build.
63+
##Show your support
5764

58-
##Running unit tests
65+
Give a ⭐️ if this project helped you!
5966

60-
Run`nx test my-app` to execute the unit tests via[Jest](https://jestjs.io).
67+
---
6168

62-
Run`nx affected:test` to execute the unit tests affected by a change.
63-
64-
##Running end-to-end tests
65-
66-
Run`ng e2e my-app` to execute the end-to-end tests via[Cypress](https://www.cypress.io).
67-
68-
Run`nx affected:e2e` to execute the end-to-end tests affected by a change.
69-
70-
##Understand your workspace
71-
72-
Run`nx dep-graph` to see a diagram of the dependencies of your projects.
73-
74-
##Further help
75-
76-
Visit the[Nx Documentation](https://nx.dev) to learn more.
69+
_This README was generated with ❤️ by[readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

‎tools/workspace-setup.sh‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
############
2+
# Workspace
3+
############
4+
npx create-nx-workspace@latest tf-test --preset="empty" --cli="nx"
5+
cd tf-test
6+
npm i -D @nrwl/react
7+
8+
############
9+
# Apps
10+
############
11+
nx g @nrwl/react:app react-coding-test --style="styled-components" --routing
12+
nx g @nrwl/react:component --name="navigation-bar" --directory="components/navigation-bar" --project react-coding-test --export=false
13+
nx g @nrwl/react:component --name="home" --directory="components/home" --project react-coding-test --export=false
14+
nx g @nrwl/react:component --name="radom-voting-list" --directory="containers/random-voting-list" --project react-coding-test --export=false
15+
16+
############
17+
# Libs
18+
############
19+
20+
# React UI lib
21+
nx g @nrwl/react:lib ui --directory=react --style="styled-components"
22+
nx g @nrwl/react:component --name="not-found" --directory="pages/not-found" --project react-ui --export
23+
nx g @nrwl/react:component --name="nav-bar" --directory="nav/nav-bar" --project react-ui --export
24+
nx g @nrwl/react:component --name="nav-logo" --directory="nav/nav-logo" --project react-ui --export
25+
nx g @nrwl/react:component --name="nav-list" --directory="nav/nav-list" --project react-ui --export
26+
nx g @nrwl/react:component --name="nav-list-item" --directory="nav/nav-list-item" --project react-ui --export
27+
nx g @nrwl/react:component --name="text-input" --directory="forms/text-input" --project react-ui --export
28+
nx g @nrwl/react:component --name="password-input" --directory="forms/password-input" --project react-ui --export
29+
nx g @nrwl/react:component --name="email-input" --directory="forms/email-input" --project react-ui --export
30+
nx g @nrwl/react:component --name="toggle-switch" --directory="forms/toggle-switch" --project react-ui --export
31+
32+
# React helpers util
33+
nx g @nrwl/react:lib util-helpers --directory="react"
34+
35+
# react-coding-test input components feature
36+
nx g @nrwl/react:lib feature-input-components --directory=react-coding-test --appProject=react-coding-test
37+
nx g @nrwl/react:component --name="focusable-input" --directory="components/focusble-input" --project react-coding-test-feature-input-components --export
38+
39+
# react-coding-test voting list feature
40+
nx g @nrwl/react:lib feature-voting-list --directory=react-coding-test --appProject=react-coding-test
41+
nx g @nrwl/react:redux voting-list --project=react-coding-test-feature-voting-list --appProject=react-coding-test --directory=store
42+
nx g @nrwl/react:component --name="voting-dashboard" --directory="containers/voting-dashboard" --project react-coding-test-feature-voting-list --export
43+
nx g @nrwl/react:component --name="voting-stats" --directory="components/voting-stats" --project react-coding-test-feature-voting-list --export
44+
nx g @nrwl/react:component --name="voting-list" --directory="components/voting-list" --project react-coding-test-feature-voting-list --export
45+
nx g @nrwl/react:component --name="voting-list-item" --directory="components/voting-list-item" --project react-coding-test-feature-voting-list --export
46+
47+
# react-coding-test register form feature
48+
nx g @nrwl/react:lib feature-register-form --directory=react-cod1ing-test --appProject=react-coding-test
49+
nx g @nrwl/react:redux register-form --project=react-coding-test-feature-register-form --appProject=react-coding-test --directory=store
50+
nx g @nrwl/react:component --name="signup-form" --directory="containers/signup-form" --project react-coding-test-feature-register-form --export
51+
nx g @nrwl/react:component --name="signup-success" --directory="components/signup-success" --project react-coding-test-feature-register-form --export=false
52+
53+
# shared util libs
54+
nx g @nrwl/workspace:lib util-voting-candidates --directory="shared"
55+
nx g @nrwl/workspace:lib util-validators --directory="shared"
56+
nx g @nrwl/workspace:lib util-formatters --directory="shared"
57+
nx g @nrwl/workspace:lib util-generators --directory="shared"
58+
nx g @nrwl/workspace:lib util-data --directory="shared"
59+
60+
# shared data-access libs
61+
nx g @nrwl/workspace:lib data-access-signup-api --directory="shared"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp