@nuxtus/nuxtus 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -103
- package/TODO +9 -3
- package/client/nuxt.config.ts +3 -0
- package/client/package.json +3 -3
- package/package.json +1 -1
- package/server/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.1](https://github.com/nuxtus/nuxtus/compare/v1.3.0...v1.3.1) (2022-08-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* :bug: Transpile heroicons for Nuxt 3rc8 compatibility ([3f56efa](https://github.com/nuxtus/nuxtus/commit/3f56efaacfdb5537907acd80b38fa3fe6e1ce12d))
|
|
9
|
+
|
|
3
10
|
# [1.3.0](https://github.com/nuxtus/nuxtus/compare/v1.2.0...v1.3.0) (2022-07-28)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -1,112 +1,13 @@
|
|
|
1
1
|
# Nuxtus
|
|
2
2
|
|
|
3
|
-
A website w/ CMS boilerplate using [Directus](https://directus.io) for backend CMS and [Nuxt](https://nuxtjs.org) (w/ Tailwind CSS) for frontend
|
|
3
|
+
A website w/ CMS boilerplate and set of utilities for using [Directus](https://directus.io) for backend CMS and [Nuxt](https://nuxtjs.org) (w/ Tailwind CSS) for frontend. Can also **automagically** create *typed* pages when you create Directus collections.
|
|
4
4
|
|
|
5
|
+
> Can be used as a boilerplate or a suite of utility tools.
|
|
5
6
|
|
|
6
|
-
https://
|
|
7
|
+
For more details visit [nuxtus.com](https://nuxtus.com) or [read the documentation](https://docs.nuxtus.com)
|
|
7
8
|
|
|
9
|
+
https://user-images.githubusercontent.com/324026/175020548-57ee94b3-dee4-4b12-a8c8-6c0f1a94fab4.mov
|
|
8
10
|
|
|
9
11
|
The purpose of this template is to be a quick-start for developing a website with Nuxt.js using Directus as the backend. The end result can be a static website or dynamically pull data from Directus depending on your preference.
|
|
10
12
|
|
|
11
13
|
It also includes [nuxtus/cli]("https://github.com/nuxtus/cli") which provides a command line interface for quickly creating multiple index/detail pages from any Directus collections.
|
|
12
|
-
|
|
13
|
-
https://user-images.githubusercontent.com/324026/175452950-46bd51a6-3fd9-441d-80fd-c6bbfaa01929.mp4
|
|
14
|
-
|
|
15
|
-
## Features
|
|
16
|
-
|
|
17
|
-
- [Directus](https://directus.io)
|
|
18
|
-
- [Nuxt](https://nuxtjs.org)
|
|
19
|
-
- [Tailwind CSS](https://tailwindcss.nuxtjs.org/)
|
|
20
|
-
- [Headless UI](https://headlessui.dev/)
|
|
21
|
-
- [HeroIcons](https://heroicons.com/)
|
|
22
|
-
- [Google Fonts](https://github.com/nuxt-community/google-fonts-module)
|
|
23
|
-
- [Nuxtus CLI](https://github.com/nuxtus/cli)
|
|
24
|
-
- Typescript types
|
|
25
|
-
|
|
26
|
-
## Quickstart (preferred)
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
$ npx create-nuxtus app-name
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
> Replace `app-name` with the name of your website or application.
|
|
33
|
-
|
|
34
|
-
Nuxtus will automatically migrate the Directus DB if you are using SQLite. Otherwise follow the directions below to manually configure your database and get started.
|
|
35
|
-
|
|
36
|
-
Your project will contain 2 folders server (Directus) and client (Nuxt).
|
|
37
|
-
|
|
38
|
-
### Directus
|
|
39
|
-
|
|
40
|
-
By default Nuxtus uses an SQLite database. If you wish to use an alternative database simply edit the `server/.env` file as suggested in the [Directus documentation](https://docs.directus.io/configuration/config-options/#database) then follow the steps below.
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
$ cd server
|
|
44
|
-
|
|
45
|
-
# From within the root of the project
|
|
46
|
-
$ npm run cli bootstrap
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
> If using Nuxt is not using `http://localhost:3000` update NUXT_SERVER in the `server/.env` file.
|
|
50
|
-
|
|
51
|
-
### Nuxt
|
|
52
|
-
|
|
53
|
-
No set up for Nuxt is required.
|
|
54
|
-
|
|
55
|
-
> If Directus is not using `http://localhost:8055` update DIRECTUS_SERVER in the `client/.env` file.
|
|
56
|
-
|
|
57
|
-
### Starting Nuxtus
|
|
58
|
-
|
|
59
|
-
From inside your project folder:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
$ npm start
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Automatically creating pages
|
|
66
|
-
|
|
67
|
-
**Nuxtus automagically creates Nuxt pages as soon as you create a new Directus collection!**
|
|
68
|
-
|
|
69
|
-
Nuxtus includes a POST endpoint located /api/directus/collection that will run in development. If you used `npx create-nuxtus` to create your Nuxtus project and selected "yes" to automatically creating pages from Directus then this is already configured in Directus for you.
|
|
70
|
-
|
|
71
|
-
Collections are also typed automatically, simply prepend "Items" to the collection name as per below:
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
<script setup lang="ts">
|
|
75
|
-
import { components } from "../interfaces/nuxtus";
|
|
76
|
-
type Test = components["schemas"]["ItemsTest"];
|
|
77
|
-
</script>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
> Because OpenAPI schemas may have invalid TypeScript characters as names, the square brackets are a safe way to access every property.
|
|
81
|
-
|
|
82
|
-
### Manually creating pages
|
|
83
|
-
|
|
84
|
-
Nuxtus includes Nuxtus CLI which will generate listing and view pages of any Directus collection on demand. To use it:
|
|
85
|
-
|
|
86
|
-
1. Log in to Directus ([http://0.0.0.0:8055/admin/login](http://0.0.0.0:8055/admin/login)) and [create a collection](https://docs.directus.io/configuration/data-model/#creating-a-collection)
|
|
87
|
-
2. From the client folder (`cd client`) run `nuxtus create` and follow the prompts
|
|
88
|
-
|
|
89
|
-
Pages will be created for each collection you select in `clients/pages`. These are a starting point for you to customise.
|
|
90
|
-
|
|
91
|
-
For more details on [Nuxtus CLI](https://github.com/nuxtus/cli) click [here](https://github.com/nuxtus/cli).
|
|
92
|
-
|
|
93
|
-
## Production deployment
|
|
94
|
-
|
|
95
|
-
By default Directus is configured to accept CORS from any origin. Nuxtus suggests modifying this for your production deployment.
|
|
96
|
-
|
|
97
|
-
If you chose to install, remove the Nuxtus hook extension by deleting the folder `server/extensions/hooks/nuxtus-hook` from your project.
|
|
98
|
-
|
|
99
|
-
## Manual setup
|
|
100
|
-
|
|
101
|
-
Clone this repo onto your local machine, remove the remote git origin and add a new one. Then follow the [manual install instructions](#directus).
|
|
102
|
-
|
|
103
|
-
> For further instructions post install, visit `[http://localhost:3000](http://localhost:3000)`
|
|
104
|
-
|
|
105
|
-
## Acknowledgements
|
|
106
|
-
|
|
107
|
-
Nuxtus wouldn't be possible without the following amazing technologies:
|
|
108
|
-
|
|
109
|
-
[Directus](https://directus.io)
|
|
110
|
-
[Nuxt](https://nuxt.js.org)
|
|
111
|
-
[Nuxt-Directus](https://nuxt-directus.netlify.app/)
|
|
112
|
-
[OpenApi Typescript](https://www.npmjs.com/package/openapi-typescript)
|
package/TODO
CHANGED
|
@@ -10,10 +10,10 @@ Todo:
|
|
|
10
10
|
✔ Query database use (via interactive shell) in create-app.js @done(22-06-21 20:26)
|
|
11
11
|
✔ Check node version for compatibility in create-app.js @done(22-06-16 22:07)
|
|
12
12
|
☐ Look at https://renovatebot.com/
|
|
13
|
-
|
|
13
|
+
✔ Documentation: https://docusaurus.io/ or https://vuepress.vuejs.org/ @done(22-08-11 16:24)
|
|
14
14
|
✔ Create Directus flow via Directus API @done(22-07-04 17:46)
|
|
15
15
|
☐ Add ability to automatically update .env for none SQLite databases
|
|
16
|
-
☐ Can I HMR when adding new pages/routes? -
|
|
16
|
+
☐ Can I HMR when adding new pages/routes? - https://github.com/nuxt/framework/issues/5766 - awaiting rc.7
|
|
17
17
|
✔ Add all questions in create-app to start of process for better user flow @done(22-07-13 19:15)
|
|
18
18
|
✔ Allow use of different ports/URLs for Directus and Nuxt (currently hard-coded) @done(22-07-13 20:42)
|
|
19
19
|
✔ Add "types" to cli to update types from Directus when not using hook - use @directus/sdk for /oas now on all apps @done(22-07-18 17:01)
|
|
@@ -28,5 +28,11 @@ Todo:
|
|
|
28
28
|
☐ GraphQL?
|
|
29
29
|
☐ Websockets (https://github.com/br41nslug/directus-websocket-subscribe)
|
|
30
30
|
✔ Upgrade nuxt-directus @done(22-07-17 11:32)
|
|
31
|
-
☐ Add ability to use Directus static token instead of login (
|
|
31
|
+
☐ Add ability to use Directus static token instead of login (requires nuxt-directus v2.3.0) - UPDATE DOCS cli.md too!
|
|
32
32
|
☐ Get added to some nuxt/directus lists etc.
|
|
33
|
+
☐ Directus and Nuxt project names in package.json based on project create name.
|
|
34
|
+
☐ Add Directus and Nuxt URL to create-nuxtus script
|
|
35
|
+
☐ Create a new package.json instead of using nuxtus one (remove all semantic release packages)
|
|
36
|
+
☐ Remove Google Fonts module (replace with fonts.bunny.net?)
|
|
37
|
+
☐ Use directus install scripts (then copy hook) instead of npm install - this will sort out DB automatically!
|
|
38
|
+
☐ Nuxtus website should actually pull data from Directus!
|
package/client/nuxt.config.ts
CHANGED
package/client/package.json
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@nuxtjs/google-fonts": "^1.3.0",
|
|
11
11
|
"@nuxtjs/tailwindcss": "^5.0.4",
|
|
12
|
-
"@nuxtus/cli": "^1.1.
|
|
12
|
+
"@nuxtus/cli": "^1.1.2",
|
|
13
13
|
"@nuxtus/nuxt-module": "^1.0.3",
|
|
14
|
-
"nuxt": "^3.0.0-rc.
|
|
14
|
+
"nuxt": "^3.0.0-rc.8"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@headlessui/vue": "^1.6.1",
|
|
18
18
|
"@heroicons/vue": "^1.0.6",
|
|
19
|
-
"nuxt-directus": "^2.
|
|
19
|
+
"nuxt-directus": "^2.3.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED