Skip to content

Commit 7775cb6

Browse files
authored
Merge pull request #64 from ishythefishy/update-readme
Update readme with NX info
2 parents 0b7e687 + f7ed2cf commit 7775cb6

File tree

1 file changed

+109
-2
lines changed

1 file changed

+109
-2
lines changed

README.md

Lines changed: 109 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,115 @@ Angular Prerender
3130
Netlify
3231
```
3332

33+
See `package.json` for commands available to the project.
34+
35+
### www.fretonator.com
36+
37+
---
3438

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

0 commit comments

Comments
 (0)