@@ -22,6 +22,8 @@ const slugify = (displayName) => {
22
22
if ( slug === 'roku-alpha' ) slug = 'roku'
23
23
if ( slug === 'shopify-by-littledata' ) slug = 'shopify-littledata'
24
24
if ( slug === 'talon-one' ) slug = 'talonone'
25
+ if ( slug == 'google-adwords-remarketing-lists-customer-match' ) slug = 'adwords-remarketing-lists'
26
+ if ( slug == 'canny-classic' ) slug = 'canny'
25
27
return slug
26
28
}
27
29
@@ -329,9 +331,6 @@ const updateDestinations = async () => {
329
331
330
332
let tempCategories = [ destination . categories . primary , destination . categories . secondary , ...destination . categories . additional ]
331
333
tempCategories = tempCategories . filter ( category => category != '' )
332
- console . log ( tempCategories )
333
-
334
- console . log ( tempCategories )
335
334
336
335
let connection_modes = getConnectionModes ( {
337
336
components : destination . components ,
@@ -389,8 +388,9 @@ const updateDestinations = async () => {
389
388
390
389
// add unique destination categories to set
391
390
tempCategories . reduce ( ( s , e ) => s . add ( e ) , categories ) ;
391
+
392
392
} )
393
-
393
+
394
394
const destinationArray = Array . from ( categories )
395
395
destinationArray . forEach ( category => {
396
396
destinationCategories . push ( {
@@ -400,20 +400,20 @@ const updateDestinations = async () => {
400
400
} )
401
401
402
402
// Create destination catalog yaml file
403
- // const options = { noArrayIndent: true };
404
- // output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
405
- // var todayDate = new Date().toISOString().slice(0,10);
406
- // output += "# destination data last updated " + todayDate + " \n";
407
- // output += yaml.safeDump({ items: destinationsUpdated }, options);
408
- // fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destinations.yml`), output);
403
+ const options = { noArrayIndent : true } ;
404
+ output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
405
+ var todayDate = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
406
+ output += "# destination data last updated " + todayDate + " \n" ;
407
+ output += yaml . safeDump ( { items : destinationsUpdated } , options ) ;
408
+ fs . writeFileSync ( path . resolve ( __dirname , `../src/_data/catalog/destinations.yml` ) , output ) ;
409
409
410
410
// Create destination-category mapping yaml file
411
- // output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
412
- // var todayDate = new Date().toISOString().slice(0,10);
413
- // output += "# destination categories last updated " + todayDate + " \n";
414
- // output += yaml.safeDump({ items: destinationCategories }, options);
415
- // fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories.yml`), output);
411
+ output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
412
+ var todayDate = new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
413
+ output += "# destination categories last updated " + todayDate + " \n" ;
414
+ output += yaml . safeDump ( { items : destinationCategories } , options ) ;
415
+ fs . writeFileSync ( path . resolve ( __dirname , `../src/_data/catalog/destination_categories.yml` ) , output ) ;
416
416
}
417
417
418
- // updateSources()
418
+ updateSources ( )
419
419
updateDestinations ( )
0 commit comments