@nuxtus/nuxtus 1.0.1 → 1.0.2
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 +1 -1
- package/changelog.md +4 -0
- package/package.json +1 -8
- package/create-app.js +0 -65
- package/data.db +0 -0
package/README.md
CHANGED
package/changelog.md
CHANGED
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.
|
|
5
|
-
"main": "create-app.js",
|
|
4
|
+
"version": "1.0.2",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "git+https://github.com/nuxtus/nuxtus.git"
|
|
@@ -20,14 +19,8 @@
|
|
|
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
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"rimraf": "^3.0.2"
|
|
32
25
|
}
|
|
33
26
|
}
|
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
|