Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-cli-build-process-scilla
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-build-process-scilla
Commits
8d14d956
Commit
8d14d956
authored
Dec 10, 2018
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加脚本执行的能力
parent
3b5a19b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
gulpfile.js
dev-config/gulpfile.js
+17
-3
No files found.
dev-config/gulpfile.js
View file @
8d14d956
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
*/
*/
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
const
fs
=
require
(
'fs'
);
const
gulp
=
require
(
'gulp'
);
const
gulp
=
require
(
'gulp'
);
const
glob
=
require
(
'glob'
);
const
rollup
=
require
(
'rollup'
);
const
rollup
=
require
(
'rollup'
);
const
{
uglify
}
=
require
(
'rollup-plugin-uglify'
);
const
{
uglify
}
=
require
(
'rollup-plugin-uglify'
);
const
resolve
=
require
(
'rollup-plugin-node-resolve'
);
const
resolve
=
require
(
'rollup-plugin-node-resolve'
);
...
@@ -40,7 +42,19 @@ if (pathsConfig) {
...
@@ -40,7 +42,19 @@ if (pathsConfig) {
}
}
}
}
}
}
//console.log(tsPaths);
gulp
.
task
(
'executeScripts'
,
function
(
cb
){
const
files
=
glob
.
sync
(
"scripts/*.js"
);
for
(
const
file
of
files
){
try
{
const
process
=
require
(
path
.
resolve
(
file
));
process
.
execute
();
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
cb
();
});
gulp
.
task
(
'compileTs'
,
async
function
()
{
gulp
.
task
(
'compileTs'
,
async
function
()
{
let
plugins
=
[
let
plugins
=
[
...
@@ -92,12 +106,12 @@ gulp.task('watch', function () {
...
@@ -92,12 +106,12 @@ gulp.task('watch', function () {
gulp
.
watch
(
'src/**'
,
[
'compile'
]);
gulp
.
watch
(
'src/**'
,
[
'compile'
]);
});
});
gulp
.
task
(
'dev'
,
[
'compile
Ts
'
,
'watch'
],
function
(
cb
)
{
gulp
.
task
(
'dev'
,
[
'compile'
,
'watch'
],
function
(
cb
)
{
completeCallback
&&
completeCallback
(
'success'
);
completeCallback
&&
completeCallback
(
'success'
);
cb
();
cb
();
});
});
gulp
.
task
(
'compile'
,
[
'compileTs'
],
function
(
cb
)
{
gulp
.
task
(
'compile'
,
[
'
executeScripts'
,
'
compileTs'
],
function
(
cb
)
{
completeCallback
&&
completeCallback
(
'success'
);
completeCallback
&&
completeCallback
(
'success'
);
cb
();
cb
();
});
});
...
...
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