Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-cli
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
game-cli
Commits
436dab90
Commit
436dab90
authored
Oct 22, 2018
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改curse命名错误
parent
c400a0fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
6 deletions
+68
-6
cli.js
bin/cli.js
+1
-0
game-cli-mock.js
bin/game-cli-mock.js
+3
-3
game-cli-serve.js
bin/game-cli-serve.js
+3
-3
package-lock.json
package-lock.json
+61
-0
No files found.
bin/cli.js
View file @
436dab90
...
...
@@ -7,6 +7,7 @@ program
.
description
(
'game command line interface'
)
.
command
(
'init [name]'
,
'Initialize a project with template'
).
alias
(
'i'
)
.
command
(
'mock'
,
'Mock server'
).
alias
(
'm'
)
.
command
(
'serve'
,
'Http server'
).
alias
(
's'
)
.
command
(
'build'
,
'Build project'
).
alias
(
'b'
)
.
command
(
'dev'
,
'Build project automatic'
).
alias
(
'd'
)
.
command
(
'publish'
,
'Publish project'
).
alias
(
'p'
)
...
...
bin/game-cli-mock.js
View file @
436dab90
...
...
@@ -3,9 +3,9 @@ const {exit,} = require('./tools');
const
jsonServer
=
require
(
'./json-server'
);
program
.
option
(
'-h, --host [string]'
,
'server host
, default localhost
'
,
'localhost'
)
.
option
(
'-p, --port [number]'
,
'server port
, default 3000
'
,
3000
)
.
option
(
'-f, --folder [string]'
,
'folder of json files
, default ./
'
,
'./'
)
.
option
(
'-h, --host [string]'
,
'server host'
,
'localhost'
)
.
option
(
'-p, --port [number]'
,
'server port'
,
3000
)
.
option
(
'-f, --folder [string]'
,
'folder of json files'
,
'./'
)
.
parse
(
process
.
argv
);
async
function
execute
()
{
...
...
bin/game-cli-serve.js
View file @
436dab90
...
...
@@ -3,9 +3,9 @@ const {exit,} = require('./tools');
const
httpServer
=
require
(
'./http-server'
);
program
.
option
(
'-h, --host [string]'
,
'server host
, default localhost
'
,
'localhost'
)
.
option
(
'-p, --port [number]'
,
'server port
, default 3001
'
,
3001
)
.
option
(
'-f, --folder [string]'
,
'folder of
json files, default ./
'
,
'./'
)
.
option
(
'-h, --host [string]'
,
'server host'
,
'localhost'
)
.
option
(
'-p, --port [number]'
,
'server port'
,
3001
)
.
option
(
'-f, --folder [string]'
,
'folder of
static files
'
,
'./'
)
.
parse
(
process
.
argv
);
async
function
execute
()
{
...
...
package-lock.json
View file @
436dab90
...
...
@@ -146,6 +146,11 @@
"resolved"
:
"http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz"
,
"integrity"
:
"sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"content-disposition"
:
{
"version"
:
"0.5.2"
,
"resolved"
:
"http://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.2.tgz"
,
"integrity"
:
"sha1-DPaLud318r55YcOoUXjLhdunjLQ="
},
"content-type"
:
{
"version"
:
"1.0.4"
,
"resolved"
:
"http://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz"
,
...
...
@@ -323,6 +328,14 @@
"resolved"
:
"http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz"
,
"integrity"
:
"sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
"fast-url-parser"
:
{
"version"
:
"1.1.3"
,
"resolved"
:
"http://registry.npm.taobao.org/fast-url-parser/download/fast-url-parser-1.1.3.tgz"
,
"integrity"
:
"sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0="
,
"requires"
:
{
"punycode"
:
"^1.3.2"
}
},
"file-uri-to-path"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"http://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz"
,
...
...
@@ -597,6 +610,19 @@
"resolved"
:
"http://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz"
,
"integrity"
:
"sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE="
},
"mime-db"
:
{
"version"
:
"1.33.0"
,
"resolved"
:
"http://registry.npm.taobao.org/mime-db/download/mime-db-1.33.0.tgz"
,
"integrity"
:
"sha1-o0kgUKXLm2NFBUHjnZeI0icng9s="
},
"mime-types"
:
{
"version"
:
"2.1.18"
,
"resolved"
:
"http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.18.tgz"
,
"integrity"
:
"sha1-bzI/YKg9ERRvgx/xH9ZuL+VQO7g="
,
"requires"
:
{
"mime-db"
:
"~1.33.0"
}
},
"minimatch"
:
{
"version"
:
"3.0.4"
,
"resolved"
:
"http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz"
,
...
...
@@ -742,6 +768,16 @@
"resolved"
:
"http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz"
,
"integrity"
:
"sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"http://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz"
,
"integrity"
:
"sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM="
},
"path-to-regexp"
:
{
"version"
:
"2.2.1"
,
"resolved"
:
"http://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-2.2.1.tgz"
,
"integrity"
:
"sha1-kLYXAloWOBqHm8gqONTovesrz0U="
},
"platform"
:
{
"version"
:
"1.3.5"
,
"resolved"
:
"http://registry.npm.taobao.org/platform/download/platform-1.3.5.tgz"
,
...
...
@@ -806,11 +842,21 @@
"once"
:
"^1.3.1"
}
},
"punycode"
:
{
"version"
:
"1.4.1"
,
"resolved"
:
"http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz"
,
"integrity"
:
"sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
"qs"
:
{
"version"
:
"6.5.2"
,
"resolved"
:
"http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz"
,
"integrity"
:
"sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
},
"range-parser"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"http://registry.npm.taobao.org/range-parser/download/range-parser-1.2.0.tgz"
,
"integrity"
:
"sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
},
"raw-body"
:
{
"version"
:
"2.3.3"
,
"resolved"
:
"http://registry.npm.taobao.org/raw-body/download/raw-body-2.3.3.tgz"
,
...
...
@@ -882,6 +928,21 @@
"resolved"
:
"http://registry.npm.taobao.org/semver/download/semver-5.6.0.tgz"
,
"integrity"
:
"sha1-fnQlb7qknHWqfHogXMInmcrIAAQ="
},
"serve-handler"
:
{
"version"
:
"5.0.5"
,
"resolved"
:
"http://registry.npm.taobao.org/serve-handler/download/serve-handler-5.0.5.tgz"
,
"integrity"
:
"sha1-WHB9LV43dAmEM0adf1EVHMuaXQU="
,
"requires"
:
{
"bytes"
:
"3.0.0"
,
"content-disposition"
:
"0.5.2"
,
"fast-url-parser"
:
"1.1.3"
,
"mime-types"
:
"2.1.18"
,
"minimatch"
:
"3.0.4"
,
"path-is-inside"
:
"1.0.2"
,
"path-to-regexp"
:
"2.2.1"
,
"range-parser"
:
"1.2.0"
}
},
"setprototypeof"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"http://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment