@nuxtus/nuxtus 1.0.1 → 1.0.5

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/README.md CHANGED
@@ -17,17 +17,36 @@ It also includes [nuxtus/cli]("https://github.com/nuxtus/cli") which provides a
17
17
  ## Quickstart (preferred)
18
18
 
19
19
  ```bash
20
- $ npx @nuxts/nuxtus app-name
21
- $ cd app-name
20
+ $ npx create-nuxtus app-name
22
21
  ```
23
22
 
24
23
  > Replace `app-name` with the name of your website or application.
25
24
 
26
- Your project will contain 2 folders server (Directus) and client (Nuxt). Run them as normal from within each folder:
25
+ 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.
26
+
27
+ Your project will contain 2 folders server (Directus) and client (Nuxt).
28
+
29
+ ### Directus
30
+
31
+ 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.
27
32
 
28
33
  ```bash
29
- ~/server $ npx directus start
30
- ~/client $ npm run dev
34
+ $ cd server
35
+
36
+ # From within the root of the project
37
+ $ npm run cli bootstrap
38
+ ```
39
+
40
+ ### Nuxt
41
+
42
+ No set up for Nuxt is required.
43
+
44
+ ### Starting Nuxtus
45
+
46
+ From inside your project folder:
47
+
48
+ ```bash
49
+ $ npm start
31
50
  ```
32
51
 
33
52
  ### Creating pages
@@ -35,7 +54,7 @@ Your project will contain 2 folders server (Directus) and client (Nuxt). Run the
35
54
  Nuxtus includes Nuxtus CLI which will automatically generate listing and view pages of any Directus collections. To use it:
36
55
 
37
56
  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)
38
- 2. From the client folder `cd client` run `nuxtus create` and follow the prompts
57
+ 2. From the client folder (`cd client`) run `nuxtus create` and follow the prompts
39
58
 
40
59
  Pages will be created for each collection you select in `clients/pages`. These are a starting point for you to customise.
41
60
 
@@ -47,23 +66,7 @@ By default Directus is configured to accept CORS from any origin. Nuxtus suggest
47
66
 
48
67
  ## Manual setup
49
68
 
50
- Clone this repo onto your local machine, remove the remote git origin and add a new one.
51
-
52
- ### Server (Directus) Setup
53
-
54
- ```bash
55
- $ cd server
56
- $ npm i
57
- $ npx directus start
58
- ```
59
-
60
- ### Client (Nuxt) Setup
61
-
62
- ```bash
63
- $ cd client
64
- $ npm i
65
- $ npm run dev
66
- ```
69
+ Clone this repo onto your local machine, remove the remote git origin and add a new one. Then follow the [manual install instructions](#directus).
67
70
 
68
71
  > For further instructions visit `[http://localhost:3000](http://localhost:3000)`
69
72
 
package/TODO CHANGED
@@ -1,4 +1,15 @@
1
1
 
2
2
  Todo:
3
3
  ☐ Handle fetch failures
4
+ ✔ Update docs.vue to use nuxtus-cli instead @done(22-06-12 20:57)
5
+ ✔ Fix code for singleton page in .vue template @done(22-06-13 19:06)
4
6
  ✔ Make a CLI for creating index/listing pages for Directus API @done(22-06-10 20:42)
7
+ ✔ Set up [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) @done(22-06-16 20:23)
8
+ ☐ Setup [semantic release](https://github.com/semantic-release/semantic-release)
9
+ ✔ Add interactive/pretty CLI for create-app.js @done(22-06-16 20:23)
10
+ ✔ Query database use (via interactive shell) in create-app.js @done(22-06-21 20:26)
11
+ ✔ Check node version for compatibility in create-app.js @done(22-06-16 22:07)
12
+ ☐ Look at https://renovatebot.com/
13
+ ☐ Documentation: https://docusaurus.io/ or https://vuepress.vuejs.org/
14
+ ☐ Look into using a Directus hook to automatically generate the Nuxt pages!
15
+ ☐ Add ability to automatically update .env for none SQLite databases
package/changelog.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Nuxtus
2
2
 
3
+ ## 1.0.5
4
+
5
+ - Update nuxtus-cli to v1.0.3
6
+
7
+ ## 1.0.4
8
+
9
+ - Hard delete the data.db file
10
+ - Update @nuxtus-cli to 1.0.2
11
+ - Update Nuxt to 3.0.0-rc.4
12
+ - Add client, server and start npm scripts
13
+
14
+ ## 1.0.3
15
+
16
+ - Add Directus CLI to package.json so `npm run cli` works
17
+ - Update getting started instructions to include database migrations
18
+ - Do not upload the sqlite database, create a new one
19
+ - Add default user/password to Directus .env
20
+ - Add @nuxtus/cli to dev dependencies
21
+ - Update `pages/docs.vue` with details on using @nuxtus/cli
22
+
23
+ ## 1.0.2
24
+
25
+ - Separate create-nuxt command
26
+
3
27
  ## 1.0.1
4
28
 
5
29
  - Correct create command in readme
package/client/.env CHANGED
@@ -3,5 +3,5 @@ DIRECTUS_URL=http://localhost:8055
3
3
  # Nuxtus values
4
4
  # For now using email and password as nuxt-directus does not support token auth
5
5
  # NUXT_PUBLIC_DIRECTUS_TOKEN=UNSECURE_ACCESS_TOKEN
6
- NUXT_PUBLIC_DIRECTUS_EMAIL=admin@test.com
6
+ NUXT_PUBLIC_DIRECTUS_EMAIL=admin@example.com
7
7
  NUXT_PUBLIC_DIRECTUS_PASSWORD=password
@@ -9,11 +9,12 @@
9
9
  "devDependencies": {
10
10
  "@nuxtjs/google-fonts": "^1.3.0",
11
11
  "@nuxtjs/tailwindcss": "^5.0.4",
12
- "nuxt": "3.0.0-rc.1"
12
+ "nuxt": "3.0.0-rc.4",
13
+ "@nuxtus/cli": "^1.0.3"
13
14
  },
14
15
  "dependencies": {
15
16
  "@headlessui/vue": "^1.6.1",
16
17
  "@heroicons/vue": "^1.0.6",
17
- "nuxt-directus": "^2.0.1"
18
+ "nuxt-directus": "^2.1.0"
18
19
  }
19
20
  }
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtus/nuxtus",
3
3
  "description": "Directus/Nuxt boilerplate with Tailwind CSS.",
4
- "version": "1.0.1",
5
- "main": "create-app.js",
4
+ "version": "1.0.5",
6
5
  "repository": {
7
6
  "type": "git",
8
7
  "url": "git+https://github.com/nuxtus/nuxtus.git"
@@ -20,14 +19,16 @@
20
19
  "url": "https://github.com/nuxtus/nuxtus/issues"
21
20
  },
22
21
  "homepage": "https://github.com/nuxtus/nuxtus#readme",
23
- "bin": {
24
- "create-nuxtus": "./create-app.js"
25
- },
26
22
  "publishConfig": {
27
23
  "access": "public",
28
24
  "registry": "https://registry.npmjs.org/"
29
25
  },
30
- "dependencies": {
31
- "rimraf": "^3.0.2"
26
+ "scripts": {
27
+ "client": "cd client && npm run dev",
28
+ "server": "cd server && npx directus start",
29
+ "start": "concurrently \"npm run client\" \"npm run server\""
30
+ },
31
+ "devDependencies": {
32
+ "concurrently": "^7.2.2"
32
33
  }
33
- }
34
+ }
package/server/.env CHANGED
@@ -64,3 +64,8 @@ EMAIL_FROM="no-reply@craigharman.com"
64
64
  EMAIL_TRANSPORT="sendmail"
65
65
  EMAIL_SENDMAIL_NEW_LINE="unix"
66
66
  EMAIL_SENDMAIL_PATH="/usr/sbin/sendmail"
67
+
68
+ ####################################################################################################
69
+ ## Default User
70
+ ADMIN_EMAIL="admin@example.com"
71
+ ADMIN_PASSWORD="password"
@@ -4,6 +4,7 @@
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
+ "cli": "directus",
7
8
  "test": "echo \"Error: no test specified\" && exit 1"
8
9
  },
9
10
  "keywords": [],
package/create-app.js DELETED
@@ -1,65 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { execSync } = require("child_process")
4
- const path = require("path")
5
- const fs = require("fs")
6
-
7
- if (process.argv.length < 3) {
8
- console.log("You have to provide a name for your app.")
9
- console.log("For example :")
10
- console.log(" npx create-nuxtus my-app")
11
- process.exit(1)
12
- }
13
-
14
- const projectName = process.argv[2]
15
- const currentPath = process.cwd()
16
- const projectPath = path.join(currentPath, projectName)
17
- const git_repo = "https://github.com/nuxtus/nuxtus"
18
-
19
- try {
20
- fs.mkdirSync(projectPath)
21
- } catch (err) {
22
- if (err.code === "EEXIST") {
23
- console.log(
24
- `The folder ${projectName} already exist in the current directory, please try another name.`
25
- )
26
- } else {
27
- console.log(error)
28
- }
29
- process.exit(1)
30
- }
31
-
32
- async function main() {
33
- try {
34
- console.log("Downloading files...")
35
- execSync(`git clone --depth 1 ${git_repo} ${projectPath}`)
36
-
37
- process.chdir(projectPath)
38
-
39
- console.log("Installing Directus dependencies...")
40
- execSync("cd server && npm install")
41
- console.log("Installing Nuxt dependencies...")
42
- execSync("cd client && npm install")
43
-
44
- console.log("Removing unused files...")
45
- execSync(
46
- "npx rimraf ./.git ./create-app.js ./package.json ./package-lock.json ./TODO ./node_modules"
47
- )
48
- fs.rmdirSync(path.join(projectPath, "bin"), { recursive: true })
49
- fs.appendFile(
50
- ".gitignore",
51
- path.join("server", ".env") + "\n" + path.join("client", ".env"),
52
- function (err) {
53
- if (err) throw err
54
- console.log("Saved!")
55
- }
56
- )
57
-
58
- console.log(
59
- "Nuxtus site is ready for use! Edit server/.env then start Directus."
60
- )
61
- } catch (error) {
62
- console.log(error)
63
- }
64
- }
65
- main()
package/data.db DELETED
File without changes
package/server/data.db DELETED
Binary file