FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodejs-template/scripts/updateSwagger.js at master · rhappdev/nodejs-template · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
rhappdev
/
nodejs-template
Public
Notifications
You must be signed in to change notification settings
Fork
239
Star
42
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodejs-template
/
scripts
/
updateSwagger.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (11 loc) · 442 Bytes
Breadcrumbs
nodejs-template
/
scripts
/
updateSwagger.js
Copy path
File metadata and controls
11 lines (11 loc) · 442 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
var
pkg
=
require
(
"../package.json"
)
;
var
swagger
=
pkg
.
swaggerDefinition
;
var
path
=
require
(
"path"
)
;
var
fs
=
require
(
"fs"
)
;
var
filePath
=
path
.
join
(
__dirname
,
"../"
,
"node_modules/sos-api/build/swaggers/"
,
swagger
+
".yaml"
)
;
var
outpuPath
=
path
.
join
(
__dirname
,
"../"
,
"src/definition/swagger.yaml"
)
;
if
(
fs
.
existsSync
(
filePath
)
)
{
fs
.
createReadStream
(
filePath
)
.
pipe
(
fs
.
createWriteStream
(
outpuPath
)
)
;
}
else
{
console
.
error
(
"File not exists "
,
filePath
)
;
}
Back
|
FazBrowse Home
|
New Git URL