FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sqlopsstudio/build/gulpfile.sql.js at master · SQL-Server-projects/sqlopsstudio · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
SQL-Server-projects
/
sqlopsstudio
Public
forked from
microsoft/azuredatastudio
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
sqlopsstudio
/
build
/
gulpfile.sql.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
97 lines (83 loc) · 3.25 KB
Breadcrumbs
sqlopsstudio
/
build
/
gulpfile.sql.js
Copy path
File metadata and controls
97 lines (83 loc) · 3.25 KB
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
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict'
;
const
gulp
=
require
(
'gulp'
)
;
const
util
=
require
(
'./lib/util'
)
;
const
tsfmt
=
require
(
'typescript-formatter'
)
;
const
es
=
require
(
'event-stream'
)
;
const
filter
=
require
(
'gulp-filter'
)
;
gulp
.
task
(
'clean-mssql-extension'
,
util
.
rimraf
(
'extensions/mssql/node_modules'
)
)
;
gulp
.
task
(
'clean-credentials-extension'
,
util
.
rimraf
(
'extensions/credentials/node_modules'
)
)
;
gulp
.
task
(
'clean-client'
,
util
.
rimraf
(
'dataprotocol-node/client/node_modules'
)
)
;
gulp
.
task
(
'clean-jsonrpc'
,
util
.
rimraf
(
'dataprotocol-node/jsonrpc/node_modules'
)
)
;
gulp
.
task
(
'clean-server'
,
util
.
rimraf
(
'dataprotocol-node/server/node_modules'
)
)
;
gulp
.
task
(
'clean-types'
,
util
.
rimraf
(
'dataprotocol-node/types/node_modules'
)
)
;
// {{SQL CARBON EDIT}}
gulp
.
task
(
'clean-extensions-modules'
,
util
.
rimraf
(
'extensions-modules/node_modules'
)
)
;
gulp
.
task
(
'clean-protocol'
,
[
'clean-extensions-modules'
,
'clean-mssql-extension'
,
'clean-credentials-extension'
,
'clean-client'
,
'clean-jsonrpc'
,
'clean-server'
,
'clean-types'
]
)
;
// Tasks to clean extensions modules
gulp
.
task
(
'clean-mssql-ext-mod'
,
util
.
rimraf
(
'extensions/mssql/node_modules/extensions-modules'
)
)
;
gulp
.
task
(
'clean-credentials-ext-mod'
,
util
.
rimraf
(
'extensions/credentials/node_modules/extensions-modules'
)
)
;
gulp
.
task
(
'clean-build-ext-mod'
,
util
.
rimraf
(
'build/node_modules/extensions-modules'
)
)
;
gulp
.
task
(
'clean-ext-mod'
,
[
'clean-mssql-ext-mod'
,
'clean-credentials-ext-mod'
,
'clean-build-ext-mod'
,
'clean-extensions-modules'
]
)
;
gulp
.
task
(
'fmt'
,
(
)
=>
formatStagedFiles
(
)
)
;
const
formatFiles
=
(
some
)
=>
{
const
formatting
=
es
.
map
(
function
(
file
,
cb
)
{
tsfmt
.
processString
(
file
.
path
,
file
.
contents
.
toString
(
'utf8'
)
,
{
replace
:
true
,
tsfmt
:
true
,
tslint
:
true
,
tsconfig
:
true
// verbose: true
}
)
.
then
(
result
=>
{
console
.
info
(
'ran formatting on file '
+
file
.
path
+
' result: '
+
result
.
message
)
;
if
(
result
.
error
)
{
console
.
error
(
result
.
message
)
;
errorCount
++
;
}
cb
(
null
,
file
)
;
}
,
err
=>
{
cb
(
err
)
;
}
)
;
}
)
;
return
gulp
.
src
(
some
,
{
base
:
'.'
}
)
.
pipe
(
filter
(
f
=>
!
f
.
stat
.
isDirectory
(
)
)
)
.
pipe
(
formatting
)
;
}
const
formatStagedFiles
=
(
)
=>
{
const
cp
=
require
(
'child_process'
)
;
cp
.
exec
(
'git diff --name-only'
,
{
maxBuffer
:
2000
*
1024
}
,
(
err
,
out
)
=>
{
if
(
err
)
{
console
.
error
(
)
;
console
.
error
(
err
)
;
process
.
exit
(
1
)
;
}
const
some
=
out
.
split
(
/
\r
?
\n
/
)
.
filter
(
l
=>
!
!
l
)
.
filter
(
l
=>
l
.
match
(
/
.
*
.
t
s
$
/
i
)
)
;
formatFiles
(
some
)
.
on
(
'error'
,
err
=>
{
console
.
error
(
)
;
console
.
error
(
err
)
;
process
.
exit
(
1
)
;
}
)
;
}
)
;
cp
.
exec
(
'git diff --cached --name-only'
,
{
maxBuffer
:
2000
*
1024
}
,
(
err
,
out
)
=>
{
if
(
err
)
{
console
.
error
(
)
;
console
.
error
(
err
)
;
process
.
exit
(
1
)
;
}
const
some
=
out
.
split
(
/
\r
?
\n
/
)
.
filter
(
l
=>
!
!
l
)
.
filter
(
l
=>
l
.
match
(
/
.
*
.
t
s
$
/
i
)
)
;
formatFiles
(
some
)
.
on
(
'error'
,
err
=>
{
console
.
error
(
)
;
console
.
error
(
err
)
;
process
.
exit
(
1
)
;
}
)
;
}
)
;
}
Back
|
FazBrowse Home
|
New Git URL