Skip to content

Commit f5506df

Browse files
author
Salma Alam-Naylor
committed
added nx stuff back into readme
1 parent 0b7e687 commit f5506df

File tree

1 file changed

+107
-2
lines changed

1 file changed

+107
-2
lines changed

README.md

Lines changed: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# www.fretonator.com
21

32
[![Netlify Status](https://api.netlify.com/api/v1/badges/87d9f619-8f13-47e8-99cc-5167db7294a6/deploy-status)](https://app.netlify.com/sites/fretonator/deploys)
43

@@ -31,7 +30,113 @@ Angular Prerender
3130
Netlify
3231
```
3332

33+
### www.fretonator.com
34+
35+
---
3436

35-
```
3637
This project was generated using [Nx](https://nx.dev).
38+
39+
🔎 **Nx is a set of Extensible Dev Tools for Monorepos.**
40+
41+
## Quick Start & Documentation
42+
43+
[Nx Documentation](https://nx.dev/angular)
44+
45+
[10-minute video showing all Nx features](https://nx.dev/angular/getting-started/what-is-nx)
46+
47+
[Interactive Tutorial](https://nx.dev/angular/tutorial/01-create-application)
48+
49+
## Adding capabilities to your workspace
50+
51+
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
52+
53+
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
54+
55+
Below are some plugins which you can add to your workspace:
56+
57+
- [Angular](https://angular.io)
58+
- `ng add @nrwl/angular`
59+
- [React](https://reactjs.org)
60+
- `ng add @nrwl/react`
61+
- Web (no framework frontends)
62+
- `ng add @nrwl/web`
63+
- [Nest](https://nestjs.com)
64+
- `ng add @nrwl/nest`
65+
- [Express](https://expressjs.com)
66+
- `ng add @nrwl/express`
67+
- [Node](https://nodejs.org)
68+
- `ng add @nrwl/node`
69+
70+
## Generate an application
71+
72+
Run `ng g @nrwl/angular:app my-app` to generate an application.
73+
74+
> You can use any of the plugins above to generate applications as well.
75+
76+
When using Nx, you can create multiple applications and libraries in the same workspace.
77+
78+
## Generate a library
79+
80+
Run `ng g @nrwl/angular:lib my-lib` to generate a library.
81+
82+
> You can also use any of the plugins above to generate libraries as well.
83+
84+
Libraries are sharable across libraries and applications. They can be imported from `@cheadle-farm/mylib`.
85+
86+
## Development server
87+
88+
Run `ng serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
89+
90+
## Code scaffolding
91+
92+
Run `ng g component my-component --project=my-app` to generate a new component.
93+
94+
## Build
95+
96+
Run `ng 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.
97+
98+
## Running unit tests
99+
100+
Run `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io).
101+
102+
Run `nx affected:test` to execute the unit tests affected by a change.
103+
104+
## Running end-to-end tests
105+
106+
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
107+
108+
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
109+
110+
## Understand your workspace
111+
112+
Run `nx dep-graph` to see a diagram of the dependencies of your projects.
113+
114+
## Further help
115+
116+
Visit the [Nx Documentation](https://nx.dev/angular) to learn more.
117+
118+
## Generating WebP images
119+
120+
Converts Jpegs to WebP (do this before optimising jpegs)
121+
122+
Dependencies
123+
- cwebp `brew install webp`
124+
125+
`cd` into the images folder and run
126+
127+
```shell script
128+
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp -q 75 $1 -o "${1%.jpg}.webp"' _ {} \;
129+
```
130+
131+
## Optimising jpegs
132+
133+
Optimises JPEG to 75% compression
134+
135+
Dependencies
136+
- jpegoptim `brew install jpegoptim`
137+
138+
`cd` into the images folder and run
139+
140+
```shell script
141+
jpegoptim -m75 *.jpg --overwrite
37142
```

0 commit comments

Comments
 (0)