@uscreen.de/create-fastify-app 0.0.0
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/bin/cli.js +23 -0
- package/package.json +44 -0
package/bin/cli.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const cli = require('commander')
|
|
4
|
+
|
|
5
|
+
let nameValue
|
|
6
|
+
let optValue
|
|
7
|
+
|
|
8
|
+
cli
|
|
9
|
+
.version('0.1.0')
|
|
10
|
+
.arguments('<name> [opt]')
|
|
11
|
+
.action(function(name, opt) {
|
|
12
|
+
nameValue = name
|
|
13
|
+
optValue = opt
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
cli.parse(process.argv)
|
|
17
|
+
|
|
18
|
+
if (typeof nameValue === 'undefined') {
|
|
19
|
+
console.error('please specify your new apps name...')
|
|
20
|
+
process.exit(1)
|
|
21
|
+
}
|
|
22
|
+
console.log('name:', nameValue)
|
|
23
|
+
console.log('opt:', optValue)
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uscreen.de/create-fastify-app",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "cli to create a new @uscreen.de/fastify-app",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-fastify-app": "./bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"repository": "git@gitlab.uscreen.net:uscreen/npm/create-fastify-app.git",
|
|
10
|
+
"author": "Marcus Spiegel <spiegel@uscreen.de>",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"lint": "eslint '**/*.js' --fix",
|
|
14
|
+
"test": "tap test/**/*.test.js",
|
|
15
|
+
"test:cov": "tap --coverage-report=html test/**/*.test.js",
|
|
16
|
+
"test:ci": "tap --coverage-report=text-summary test/**/*.test.js"
|
|
17
|
+
},
|
|
18
|
+
"gitHooks": {
|
|
19
|
+
"pre-commit": "lint-staged"
|
|
20
|
+
},
|
|
21
|
+
"lint-staged": {
|
|
22
|
+
"*.{js}": [
|
|
23
|
+
"eslint --fix",
|
|
24
|
+
"git add"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"commander": "^3.0.2"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"eslint": "^6.5.1",
|
|
32
|
+
"eslint-config-prettier": "^6.3.0",
|
|
33
|
+
"eslint-config-standard": "^14.1.0",
|
|
34
|
+
"eslint-plugin-import": "^2.18.2",
|
|
35
|
+
"eslint-plugin-node": "^10.0.0",
|
|
36
|
+
"eslint-plugin-prettier": "^3.1.1",
|
|
37
|
+
"eslint-plugin-promise": "^4.2.1",
|
|
38
|
+
"eslint-plugin-standard": "^4.0.1",
|
|
39
|
+
"lint-staged": "^9.4.1",
|
|
40
|
+
"prettier": "^1.18.2",
|
|
41
|
+
"tap": "^14.6.9",
|
|
42
|
+
"yorkie": "^2.0.0"
|
|
43
|
+
}
|
|
44
|
+
}
|