typings-generator.js
 1  #!/usr/bin/env node
 2  
 3  /*
 4   * Pass optional path to target directory as command line argument.
 5   *
 6   * The directory must include the apis/ folder and service customizations at
 7   * `lib/services`. Clients will be generated in `clients/`.
 8   *
 9   * If parameter is not passed the repository root will be used.
10   */
11  
12  var path = require('path');
13  var TSGenerator = require('./lib/ts-generator');
14  
15  var basePath = process.argv[2] || path.join(__dirname, '..');
16  
17  var tsGenerator = new TSGenerator({
18      SdkRootDirectory: basePath
19  });
20  
21  tsGenerator.generateAllClientTypings();
22  tsGenerator.generateGroupedClients();
23  tsGenerator.updateDynamoDBDocumentClient();
24  tsGenerator.generateConfigurationServicePlaceholders();
25  console.log('TypeScript Definitions created.');