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
e01e526f
Commit
e01e526f
authored
Nov 28, 2018
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改compile:单次编译项目,dev:实时编译项目,build:发布构建项目
parent
54e55b3c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
26 deletions
+38
-26
cli.js
bin/cli.js
+2
-2
game-cli-build.js
bin/game-cli-build.js
+10
-3
game-cli-compile.js
bin/game-cli-compile.js
+13
-0
game-cli-dev.js
bin/game-cli-dev.js
+13
-0
game-cli-publish.js
bin/game-cli-publish.js
+0
-21
No files found.
bin/cli.js
View file @
e01e526f
...
...
@@ -8,8 +8,8 @@ program
.
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
(
'
compile'
,
'Compile project'
).
alias
(
'c
'
)
.
command
(
'dev'
,
'Build project automatic'
).
alias
(
'd'
)
.
command
(
'
publish'
,
'Publish project'
).
alias
(
'p
'
)
.
command
(
'
build'
,
'Publish project'
).
alias
(
'b
'
)
.
command
(
'upload'
,
'Upload project to oss'
).
alias
(
'u'
)
.
parse
(
process
.
argv
);
bin/game-cli-build.js
View file @
e01e526f
const
program
=
require
(
'commander'
);
const
{
exit
,
executeBuildProcess
}
=
require
(
'./tools'
);
const
{
exit
,
executeBuildProcess
,
updateProjectConfig
}
=
require
(
'./tools'
);
program
.
option
(
'-
w, --watch'
,
'Watch file changing'
)
.
option
(
'-
u, --upload-auto'
,
'Auto upload after publish success'
,
false
)
.
parse
(
process
.
argv
);
async
function
execute
()
{
await
executeBuildProcess
(
'build'
);
const
version
=
await
executeBuildProcess
(
'build'
);
//console.log('detected version:', version);
updateProjectConfig
(
'version'
,
version
);
if
(
program
.
uploadAuto
){
console
.
log
(
'
\
nAuto uploading...'
);
require
(
'./game-cli-upload'
);
}
}
execute
().
catch
(
e
=>
{
...
...
bin/game-cli-compile.js
0 → 100755
View file @
e01e526f
const
program
=
require
(
'commander'
);
const
{
exit
,
executeBuildProcess
}
=
require
(
'./tools'
);
program
.
parse
(
process
.
argv
);
async
function
execute
()
{
await
executeBuildProcess
(
'compile'
);
}
execute
().
catch
(
e
=>
{
exit
(
e
);
});
bin/game-cli-dev.js
0 → 100755
View file @
e01e526f
const
program
=
require
(
'commander'
);
const
{
exit
,
executeBuildProcess
}
=
require
(
'./tools'
);
program
.
parse
(
process
.
argv
);
async
function
execute
()
{
await
executeBuildProcess
(
'dev'
);
}
execute
().
catch
(
e
=>
{
exit
(
e
);
});
bin/game-cli-publish.js
deleted
100755 → 0
View file @
54e55b3c
const
program
=
require
(
'commander'
);
const
{
exit
,
executeBuildProcess
,
updateProjectConfig
}
=
require
(
'./tools'
);
program
.
option
(
'-u, --upload-auto'
,
'Auto upload after publish success'
,
false
)
.
parse
(
process
.
argv
);
async
function
execute
()
{
const
version
=
await
executeBuildProcess
(
'publish'
);
//console.log('detected version:', version);
updateProjectConfig
(
'version'
,
version
);
if
(
program
.
uploadAuto
){
console
.
log
(
'
\
nAuto uploading...'
);
require
(
'./game-cli-upload'
);
}
}
execute
().
catch
(
e
=>
{
exit
(
e
);
});
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