Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
b60b2ec9
Commit
b60b2ec9
authored
Nov 11, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4277e2f2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
17 deletions
+11
-17
gulpfile.js
v2.0/compileServer/gulpfile.js
+5
-4
controller.export.njk
v2.0/compileServer/templates/controller.export.njk
+2
-0
index.ts
v2.0/src/decorator/custom/index.ts
+1
-3
index.ts
v2.0/src/index.ts
+0
-1
index.ts
v2.0/src/service/custom/index.ts
+1
-3
index.ts
v2.0/src/utils/custom/index.ts
+2
-6
No files found.
v2.0/compileServer/gulpfile.js
View file @
b60b2ec9
...
...
@@ -51,11 +51,12 @@ gulp.task('build', function () {
return
codeGenerate
.
run
(
gulp
,
nunjucksRender
,
rename
,
nunjucksRenderConfig
)
})
gulp
.
task
(
'format'
,
()
=>
{
return
gulp
.
src
(
nunjucksRenderConfig
.
ServerFullPath
+
'/
controller/
**/*.ts'
)
gulp
.
task
(
'format'
,
async
()
=>
{
await
gulp
.
src
(
nunjucksRenderConfig
.
ServerFullPath
+
'/**/*.ts'
)
.
pipe
(
prettier
(
prettierConfig
))
.
pipe
(
gulp
.
dest
(
nunjucksRenderConfig
.
ServerFullPath
+
'/controller'
))
.
pipe
(
gulp
.
dest
(
nunjucksRenderConfig
.
ServerFullPath
+
'/'
))
})
gulp
.
task
(
'code'
,
gulp
.
series
(
'build'
,
'format'
))
v2.0/compileServer/templates/controller.export.njk
View file @
b60b2ec9
/** @format */
{%- for type, type_item in controllers -%}
{%- for controller, controller_item in type_item %}
import {{type | capitalize}}{{controller | capitalize}}Controller from './controller/{{type}}/{{controller}}.controller'
...
...
v2.0/src/decorator/custom/index.ts
View file @
b60b2ec9
...
...
@@ -8,6 +8,4 @@ const custom = {
export
default
custom
export
{
test1
}
export
{
test1
}
v2.0/src/index.ts
View file @
b60b2ec9
/** @format */
import
CommonUserController
from
'./controller/common/user.controller'
const
CommonUserControllerInstance
=
new
CommonUserController
()
import
CommonTaskController
from
'./controller/common/task.controller'
...
...
v2.0/src/service/custom/index.ts
View file @
b60b2ec9
...
...
@@ -7,6 +7,4 @@ const custom = {
export
default
custom
export
{
CustomTestService
}
export
{
CustomTestService
}
v2.0/src/utils/custom/index.ts
View file @
b60b2ec9
/** @format */
const
custom
=
{
}
const
custom
=
{}
export
default
custom
export
{
}
export
{}
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