@@ -127,6 +127,9 @@ const buildServices = (() => {
127
127
// build typescriptServices.out.js
128
128
const buildTypescriptServicesOut = ( ) => buildProject ( "built/local/typescriptServices.tsconfig.json" , cmdLineOptions ) ;
129
129
130
+ // build typescriptServices/typescriptServices.js
131
+ const buildTypescriptServicesOut1 = ( ) => buildProject ( "src/typescriptServices/tsconfig.json" , { ...cmdLineOptions , lkg : false } ) ;
132
+
130
133
// create typescriptServices.js
131
134
const createTypescriptServicesJs = ( ) => src ( "built/local/typescriptServices.out.js" )
132
135
. pipe ( newer ( "built/local/typescriptServices.js" ) )
@@ -136,6 +139,15 @@ const buildServices = (() => {
136
139
. pipe ( sourcemaps . write ( "." , { includeContent : false , destPath : "built/local" } ) )
137
140
. pipe ( dest ( "built/local" ) ) ;
138
141
142
+ // create typescriptServices1.js
143
+ const createTypescriptServicesJs1 = ( ) => src ( "built/local/typescriptServices/typescriptServices.js" )
144
+ . pipe ( newer ( "built/local/typescriptServices1.js" ) )
145
+ . pipe ( sourcemaps . init ( { loadMaps : true } ) )
146
+ . pipe ( prependFile ( copyright ) )
147
+ . pipe ( rename ( "typescriptServices1.js" ) )
148
+ . pipe ( sourcemaps . write ( "." , { includeContent : false , destPath : "built/local" } ) )
149
+ . pipe ( dest ( "built/local" ) ) ;
150
+
139
151
// create typescriptServices.d.ts
140
152
const createTypescriptServicesDts = ( ) => src ( "built/local/typescriptServices.out.d.ts" )
141
153
. pipe ( newer ( "built/local/typescriptServices.d.ts" ) )
@@ -144,6 +156,14 @@ const buildServices = (() => {
144
156
. pipe ( rename ( "typescriptServices.d.ts" ) )
145
157
. pipe ( dest ( "built/local" ) ) ;
146
158
159
+ // create typescriptServices1.d.ts
160
+ const createTypescriptServicesDts1 = ( ) => src ( "built/local/typescriptServices/typescriptServices.d.ts" )
161
+ . pipe ( newer ( "built/local/typescriptServices1.d.ts" ) )
162
+ . pipe ( prependFile ( copyright ) )
163
+ . pipe ( transform ( content => content . replace ( / ^ ( \s * ) ( e x p o r t ) ? c o n s t e n u m ( \S + ) { ( \s * ) $ / gm, "$1$2enum $3 {$4" ) ) )
164
+ . pipe ( rename ( "typescriptServices1.d.ts" ) )
165
+ . pipe ( dest ( "built/local" ) ) ;
166
+
147
167
// create typescript.js
148
168
const createTypescriptJs = ( ) => src ( "built/local/typescriptServices.js" )
149
169
. pipe ( newer ( "built/local/typescript.js" ) )
@@ -152,28 +172,58 @@ const buildServices = (() => {
152
172
. pipe ( sourcemaps . write ( "." , { includeContent : false , destPath : "built/local" } ) )
153
173
. pipe ( dest ( "built/local" ) ) ;
154
174
175
+ // create typescript1.js
176
+ const createTypescriptJs1 = ( ) => src ( "built/local/typescriptServices1.js" )
177
+ . pipe ( newer ( "built/local/typescript1.js" ) )
178
+ . pipe ( sourcemaps . init ( { loadMaps : true } ) )
179
+ . pipe ( rename ( "typescript1.js" ) )
180
+ . pipe ( sourcemaps . write ( "." , { includeContent : false , destPath : "built/local" } ) )
181
+ . pipe ( dest ( "built/local" ) ) ;
182
+
155
183
// create typescript.d.ts
156
184
const createTypescriptDts = ( ) => src ( "built/local/typescriptServices.d.ts" )
157
185
. pipe ( newer ( "built/local/typescript.d.ts" ) )
158
186
. pipe ( append ( "\nexport = ts;" ) )
159
187
. pipe ( rename ( "typescript.d.ts" ) )
160
188
. pipe ( dest ( "built/local" ) ) ;
161
189
190
+ // create typescript1.d.ts
191
+ const createTypescriptDts1 = ( ) => src ( "built/local/typescriptServices1.d.ts" )
192
+ . pipe ( newer ( "built/local/typescript1.d.ts" ) )
193
+ . pipe ( append ( "\nexport = ts;" ) )
194
+ . pipe ( rename ( "typescript1.d.ts" ) )
195
+ . pipe ( dest ( "built/local" ) ) ;
196
+
162
197
// create typescript_standalone.d.ts
163
198
const createTypescriptStandaloneDts = ( ) => src ( "built/local/typescriptServices.d.ts" )
164
199
. pipe ( newer ( "built/local/typescript_standalone.d.ts" ) )
165
200
. pipe ( transform ( content => content . replace ( / d e c l a r e ( n a m e s p a c e | m o d u l e ) t s / g, 'declare module "typescript"' ) ) )
166
201
. pipe ( rename ( "typescript_standalone.d.ts" ) )
167
202
. pipe ( dest ( "built/local" ) ) ;
168
203
204
+ // create typescript_standalone.d.ts
205
+ const createTypescriptStandaloneDts1 = ( ) => src ( "built/local/typescriptServices1.d.ts" )
206
+ . pipe ( newer ( "built/local/typescript_standalone1.d.ts" ) )
207
+ . pipe ( transform ( content => content . replace ( / d e c l a r e ( n a m e s p a c e | m o d u l e ) t s / g, 'declare module "typescript"' ) ) )
208
+ . pipe ( rename ( "typescript_standalone1.d.ts" ) )
209
+ . pipe ( dest ( "built/local" ) ) ;
210
+
169
211
return series (
170
212
flattenServicesConfig ,
171
213
buildTypescriptServicesOut ,
172
214
createTypescriptServicesJs ,
173
215
createTypescriptServicesDts ,
174
216
createTypescriptJs ,
175
217
createTypescriptDts ,
176
- createTypescriptStandaloneDts ) ;
218
+ createTypescriptStandaloneDts ,
219
+ localPreBuild ,
220
+ buildTypescriptServicesOut1 ,
221
+ createTypescriptServicesJs1 ,
222
+ createTypescriptServicesDts1 ,
223
+ createTypescriptJs1 ,
224
+ createTypescriptDts1 ,
225
+ createTypescriptStandaloneDts1 ,
226
+ ) ;
177
227
} ) ( ) ;
178
228
task ( "services" , series ( preBuild , buildServices ) ) ;
179
229
task ( "services" ) . description = "Builds the language service" ;
@@ -193,6 +243,13 @@ const cleanServices = async () => {
193
243
"built/local/typescript.js" ,
194
244
"built/local/typescript.d.ts" ,
195
245
"built/local/typescript_standalone.d.ts" ,
246
+ "built/local/typescriptServices/typescriptServices.js" ,
247
+ "built/local/typescriptServices/typescriptServices.js.map" ,
248
+ "built/local/typescriptServices/typescriptServices.d.ts" ,
249
+ "built/local/typescriptServices1.js" ,
250
+ "built/local/typescript1.js" ,
251
+ "built/local/typescript1.d.ts" ,
252
+ "built/local/typescript_standalone1.d.ts" ,
196
253
] ) ;
197
254
} ;
198
255
cleanTasks . push ( cleanServices ) ;
@@ -263,6 +320,9 @@ const buildLssl = (() => {
263
320
// build tsserverlibrary.out.js
264
321
const buildServerLibraryOut = ( ) => buildProject ( "built/local/tsserverlibrary.tsconfig.json" , cmdLineOptions ) ;
265
322
323
+ // build tsserverlibrary1.out.js
324
+ const buildServerLibraryOut1 = ( ) => buildProject ( "src/tsserverlibrary/tsconfig.json" , { ...cmdLineOptions , lkg : false } ) ;
325
+
266
326
// create tsserverlibrary.js
267
327
const createServerLibraryJs = ( ) => src ( "built/local/tsserverlibrary.out.js" )
268
328
. pipe ( newer ( "built/local/tsserverlibrary.js" ) )
@@ -272,6 +332,15 @@ const buildLssl = (() => {
272
332
. pipe ( sourcemaps . write ( "." , { includeContent : false , destPath : "built/local" } ) )
273
333
. pipe ( dest ( "built/local" ) ) ;
274
334
335
+ // create tsserverlibrary1.js
336
+ const createServerLibraryJs1 = ( ) => src ( "built/local/tsserverlibrary/tsserverlibrary.js" )
337
+ . pipe ( newer ( "built/local/tsserverlibrary1.js" ) )
338
+ . pipe ( sourcemaps . init ( { loadMaps : true } ) )
339
+ . pipe ( prependFile ( copyright ) )
340
+ . pipe ( rename ( "tsserverlibrary1.js" ) )
341
+ . pipe ( sourcemaps . write ( "." , { includeContent : false , destPath : "built/local" } ) )
342
+ . pipe ( dest ( "built/local" ) ) ;
343
+
275
344
// create tsserverlibrary.d.ts
276
345
const createServerLibraryDts = ( ) => src ( "built/local/tsserverlibrary.out.d.ts" )
277
346
. pipe ( newer ( "built/local/tsserverlibrary.d.ts" ) )
@@ -281,11 +350,25 @@ const buildLssl = (() => {
281
350
. pipe ( rename ( "tsserverlibrary.d.ts" ) )
282
351
. pipe ( dest ( "built/local" ) ) ;
283
352
353
+ // create tsserverlibrary1.d.ts
354
+ const createServerLibraryDts1 = ( ) => src ( "built/local/tsserverlibrary/tsserverlibrary.d.ts" )
355
+ . pipe ( newer ( "built/local/tsserverlibrary1.d.ts" ) )
356
+ . pipe ( prependFile ( copyright ) )
357
+ . pipe ( transform ( content => content . replace ( / ^ ( \s * ) ( e x p o r t ) ? c o n s t e n u m ( \S + ) { ( \s * ) $ / gm, "$1$2enum $3 {$4" ) ) )
358
+ . pipe ( append ( "\nexport = ts;\nexport as namespace ts;" ) )
359
+ . pipe ( rename ( "tsserverlibrary1.d.ts" ) )
360
+ . pipe ( dest ( "built/local" ) ) ;
361
+
284
362
return series (
285
363
flattenTsServerProject ,
286
364
buildServerLibraryOut ,
287
365
createServerLibraryJs ,
288
- createServerLibraryDts ) ;
366
+ createServerLibraryDts ,
367
+ localPreBuild ,
368
+ buildServerLibraryOut1 ,
369
+ createServerLibraryJs1 ,
370
+ createServerLibraryDts1
371
+ ) ;
289
372
} ) ( ) ;
290
373
task ( "lssl" , series ( preBuild , buildLssl ) ) ;
291
374
task ( "lssl" ) . description = "Builds language service server library" ;
@@ -303,6 +386,11 @@ const cleanLssl = async () => {
303
386
"built/local/tsserverlibrary.out.d.ts" ,
304
387
"built/local/tsserverlibrary.js" ,
305
388
"built/local/tsserverlibrary.d.ts" ,
389
+ "built/local/tsserverlibrary/tsserverlibrary.js" ,
390
+ "built/local/tsserverlibrary/tsserverlibrary.js.map" ,
391
+ "built/local/tsserverlibrary/tsserverlibrary.d.ts" ,
392
+ "built/local/tsserverlibrary1.js" ,
393
+ "built/local/tsserverlibrary1.d.ts" ,
306
394
] ) ;
307
395
} ;
308
396
cleanTasks . push ( cleanLssl ) ;
0 commit comments